diff options
Diffstat (limited to 'candle-nn/src')
-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()) } } |