diff options
author | Anubhab Bandyopadhyay <4890833+AnubhabB@users.noreply.github.com> | 2024-11-29 03:30:21 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-11-28 23:00:21 +0100 |
commit | 54e7fc3c97a6d40e459cee4d4bf2eff5c82390da (patch) | |
tree | 8ef4da0e255884de729b8c70fdf642b7c807d631 /candle-nn/src/var_builder.rs | |
parent | 23ed8a9ded155df7b5961d6a5ae12b4e8096a9c2 (diff) | |
download | candle-54e7fc3c97a6d40e459cee4d4bf2eff5c82390da.tar.gz candle-54e7fc3c97a6d40e459cee4d4bf2eff5c82390da.tar.bz2 candle-54e7fc3c97a6d40e459cee4d4bf2eff5c82390da.zip |
Lint fixes introduced with Rust 1.83 (#2646)
* Fixes for lint errors introduced with Rust 1.83
* rustfmt
* Fix more lints.
---------
Co-authored-by: Laurent <laurent.mazare@gmail.com>
Diffstat (limited to 'candle-nn/src/var_builder.rs')
-rw-r--r-- | candle-nn/src/var_builder.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/candle-nn/src/var_builder.rs b/candle-nn/src/var_builder.rs index 2731456d..ba410e4e 100644 --- a/candle-nn/src/var_builder.rs +++ b/candle-nn/src/var_builder.rs @@ -20,7 +20,7 @@ pub struct VarBuilderArgs<'a, B: Backend> { _phantom: std::marker::PhantomData<&'a B>, } -impl<'a, B: Backend> Clone for VarBuilderArgs<'a, B> { +impl<B: Backend> Clone for VarBuilderArgs<'_, B> { fn clone(&self) -> Self { Self { data: self.data.clone(), @@ -76,7 +76,7 @@ pub trait SimpleBackend: Send + Sync { fn contains_tensor(&self, name: &str) -> bool; } -impl<'a> Backend for Box<dyn SimpleBackend + 'a> { +impl Backend for Box<dyn SimpleBackend + '_> { type Hints = crate::Init; fn get( &self, @@ -94,7 +94,7 @@ impl<'a> Backend for Box<dyn SimpleBackend + 'a> { } } -impl<'a, B: Backend> VarBuilderArgs<'a, B> { +impl<B: Backend> VarBuilderArgs<'_, B> { pub fn new_with_args(backend: B, dtype: DType, dev: &Device) -> Self { let data = TensorData { backend, @@ -286,7 +286,7 @@ pub struct SafeTensorWithRouting<'a> { safetensors: Vec<SafeTensors<'a>>, } -impl<'a> SimpleBackend for SafeTensorWithRouting<'a> { +impl SimpleBackend for SafeTensorWithRouting<'_> { fn get( &self, s: Shape, @@ -439,7 +439,7 @@ impl SimpleBackend for candle::safetensors::BufferedSafetensors { } } -impl<'a> SimpleBackend for candle::safetensors::SliceSafetensors<'a> { +impl SimpleBackend for candle::safetensors::SliceSafetensors<'_> { fn get( &self, s: Shape, @@ -732,7 +732,7 @@ pub struct Rename<'a, R: Renamer> { renamer: R, } -impl<'a, R: Renamer + Sync + Send> SimpleBackend for Rename<'a, R> { +impl<R: Renamer + Sync + Send> SimpleBackend for Rename<'_, R> { fn get( &self, s: Shape, |