clippy fixes

This commit is contained in:
Heikki Linnakangas
2022-12-08 09:55:43 +02:00
parent e0c43396bf
commit 4481e6e4cb
2 changed files with 3 additions and 4 deletions

View File

@@ -713,9 +713,8 @@ fn parse_toml_string(name: &str, item: &Item) -> Result<String> {
}
fn parse_toml_bool(name: &str, item: &Item) -> Result<bool> {
Ok(item
.as_bool()
.with_context(|| format!("configure option {name} is not a boolean"))?)
item.as_bool()
.with_context(|| format!("configure option {name} is not a boolean"))
}
fn parse_toml_u64(name: &str, item: &Item) -> Result<u64> {

View File

@@ -160,7 +160,7 @@ pub fn is_uninit_mark(path: &Path) -> bool {
#[macro_export]
macro_rules! fail_point {
($($name:expr),*) => {{
if cfg!(test) || *crate::TESTING_MODE.get().expect("testing_mode not initialized") {
if cfg!(test) || *$crate::TESTING_MODE.get().expect("testing_mode not initialized") {
fail::fail_point!($($name), *)
}
}};