-
Notifications
You must be signed in to change notification settings - Fork 175
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add NVS usage example using the native Rust API #276
Conversation
Doing too many things - sorry! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Really just two small nits.
examples/nvs_get_set_raw_storage.rs
Outdated
info!("{:?} = {:?}", tag_raw_str, from_bytes::<&str>(the_str)); | ||
} | ||
} | ||
Err(e) => info!("Couldn't get tag {} because{:?}", tag_raw_str, e), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: missing space
examples/nvs_get_set_raw_storage.rs
Outdated
Err(e) => panic!("Could't get namespace {:?}", e), | ||
}; | ||
|
||
let tag_raw_u8 = "test_raw_u8"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rather than tag
s, can we name these things key
s?
examples/nvs_get_set_raw_storage.rs
Outdated
) | ||
} | ||
} | ||
Err(e) => info!("Couldn't get tag {} because{:?}", tag_raw_str, e), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ditto - missing space?
done! |
Please note that I have added a new dependence (postcard) just for the example. I don't know if that is OK for you or it is better to use something already added (json?).