diff options
author | Laurent Mazare <laurent.mazare@gmail.com> | 2025-01-10 10:15:15 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-01-10 10:15:15 +0100 |
commit | 2344c4e4b89dcb57c021459140c3914faa4df603 (patch) | |
tree | 484a868167e4c02704234418d1121c7f638e929d /candle-nn | |
parent | 32defdb7d5c30b22f22e65a5af20b4558d626ec1 (diff) | |
download | candle-2344c4e4b89dcb57c021459140c3914faa4df603.tar.gz candle-2344c4e4b89dcb57c021459140c3914faa4df603.tar.bz2 candle-2344c4e4b89dcb57c021459140c3914faa4df603.zip |
Clippy fixes for 1.84. (#2710)
Diffstat (limited to 'candle-nn')
-rw-r--r-- | candle-nn/src/var_builder.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/candle-nn/src/var_builder.rs b/candle-nn/src/var_builder.rs index ba410e4e..cce60508 100644 --- a/candle-nn/src/var_builder.rs +++ b/candle-nn/src/var_builder.rs @@ -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()) } } |