diff --git a/src/annotations.rs b/src/annotations.rs index f7a0d03..fa61e6c 100644 --- a/src/annotations.rs +++ b/src/annotations.rs @@ -13,12 +13,12 @@ const MAX_NAME_LEN: usize = 63; // be in the format of "vendor.device-type". #[allow(dead_code)] pub(crate) fn update_annotations( - option_annotaions: Option>, + option_annotations: Option>, plugin_name: &str, device_id: &str, devices: Vec, ) -> Result> { - let mut annotations = option_annotations.unwrap_or_else(HashMap::new); + let mut annotations = option_annotations.unwrap_or_default(); let key = annotation_key(plugin_name, device_id).context("CDI annotation key failed")?; if annotations.contains_key(&key) { diff --git a/src/spec_dirs.rs b/src/spec_dirs.rs index e550fd3..5a956bd 100644 --- a/src/spec_dirs.rs +++ b/src/spec_dirs.rs @@ -23,7 +23,7 @@ lazy_static! { // DEFAULT_SPEC_DIRS is the default Spec directory configuration. // While altering this variable changes the package defaults, // the preferred way of overriding the default directories is - // to use a WithSpecDirs options. Otherwise the change is only + // to use a with_spec_dirs options. Otherwise the change is only // effective if it takes place before creating the Registry or // other Cache instances. pub static ref DEFAULT_SPEC_DIRS: &'static [&'static str] = &[