Skip to content

Commit 5760006

Browse files
authored
Merge pull request #36 from ChengyuZhu6/typo
Fix typos
2 parents 3d3e665 + 4b97986 commit 5760006

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/annotations.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ const MAX_NAME_LEN: usize = 63;
1313
// be in the format of "vendor.device-type".
1414
#[allow(dead_code)]
1515
pub(crate) fn update_annotations(
16-
option_annotaions: Option<HashMap<String, String>>,
16+
option_annotations: Option<HashMap<String, String>>,
1717
plugin_name: &str,
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) {

src/spec_dirs.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ lazy_static! {
2323
// DEFAULT_SPEC_DIRS is the default Spec directory configuration.
2424
// While altering this variable changes the package defaults,
2525
// the preferred way of overriding the default directories is
26-
// to use a WithSpecDirs options. Otherwise the change is only
26+
// to use a with_spec_dirs options. Otherwise the change is only
2727
// effective if it takes place before creating the Registry or
2828
// other Cache instances.
2929
pub static ref DEFAULT_SPEC_DIRS: &'static [&'static str] = &[

0 commit comments

Comments
 (0)