Skip to content

Commit 4b97986

Browse files
committed
fix clippy check error
use `unwrap_or_default` to fix clippy check error. Signed-off-by: ChengyuZhu6 <[email protected]>
1 parent 41a179b commit 4b97986

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/annotations.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ pub(crate) fn update_annotations(
1818
device_id: &str,
1919
devices: Vec<String>,
2020
) -> Result<HashMap<String, String>> {
21-
let mut annotations = option_annotations.unwrap_or_else(HashMap::new);
21+
let mut annotations = option_annotations.unwrap_or_default();
2222

2323
let key = annotation_key(plugin_name, device_id).context("CDI annotation key failed")?;
2424
if annotations.contains_key(&key) {

0 commit comments

Comments
 (0)