mirror of
https://github.com/huggingface/candle.git
synced 2025-06-19 19:58:35 +00:00
Clippy fixes for 1.84. (#2710)
This commit is contained in:
@ -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())
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user