From 2344c4e4b89dcb57c021459140c3914faa4df603 Mon Sep 17 00:00:00 2001 From: Laurent Mazare Date: Fri, 10 Jan 2025 10:15:15 +0100 Subject: Clippy fixes for 1.84. (#2710) --- candle-nn/src/var_builder.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'candle-nn') 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()) } } -- cgit v1.2.3