Clippy fixes for 1.84. (#2710)

This commit is contained in:
Laurent Mazare
2025-01-10 10:15:15 +01:00
committed by GitHub
parent 32defdb7d5
commit 2344c4e4b8
2 changed files with 3 additions and 6 deletions

View File

@ -350,7 +350,7 @@ impl SimpleBackend for candle::npy::NpzTensors {
}
fn contains_tensor(&self, name: &str) -> bool {
self.get(name).map_or(false, |v| v.is_some())
self.get(name).is_ok_and(|v| v.is_some())
}
}
@ -383,7 +383,7 @@ impl SimpleBackend for candle::pickle::PthTensors {
}
fn contains_tensor(&self, name: &str) -> bool {
self.get(name).map_or(false, |v| v.is_some())
self.get(name).is_ok_and(|v| v.is_some())
}
}