diff --git a/src/nn/func.rs b/src/nn/func.rs index 56047b49..123be59c 100644 --- a/src/nn/func.rs +++ b/src/nn/func.rs @@ -6,7 +6,7 @@ pub struct Func<'a> { f: Box Tensor + Send>, } -impl<'a> std::fmt::Debug for Func<'a> { +impl std::fmt::Debug for Func<'_> { fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { write!(f, "func") } @@ -19,7 +19,7 @@ where Func { f: Box::new(f) } } -impl<'a> super::module::Module for Func<'a> { +impl super::module::Module for Func<'_> { fn forward(&self, xs: &Tensor) -> Tensor { (*self.f)(xs) } @@ -31,7 +31,7 @@ pub struct FuncT<'a> { f: Box Tensor + Send>, } -impl<'a> std::fmt::Debug for FuncT<'a> { +impl std::fmt::Debug for FuncT<'_> { fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { write!(f, "funcT") } @@ -44,7 +44,7 @@ where FuncT { f: Box::new(f) } } -impl<'a> super::module::ModuleT for FuncT<'a> { +impl super::module::ModuleT for FuncT<'_> { fn forward_t(&self, xs: &Tensor, train: bool) -> Tensor { (*self.f)(xs, train) } diff --git a/src/nn/var_store.rs b/src/nn/var_store.rs index e78c83a0..145f0b41 100644 --- a/src/nn/var_store.rs +++ b/src/nn/var_store.rs @@ -828,7 +828,7 @@ impl<'a> Path<'a> { } } -impl<'a> Entry<'a> { +impl Entry<'_> { /// Returns the existing entry if, otherwise create a new variable. /// /// If this entry name matches the name of a variables stored in the diff --git a/src/tensor/safetensors.rs b/src/tensor/safetensors.rs index b445463b..8ce0389f 100644 --- a/src/tensor/safetensors.rs +++ b/src/tensor/safetensors.rs @@ -83,7 +83,7 @@ impl<'a> TryFrom<&'a Tensor> for SafeView<'a> { } } -impl<'a> View for SafeView<'a> { +impl View for SafeView<'_> { fn dtype(&self) -> Dtype { self.dtype } diff --git a/torch-sys/Cargo.toml b/torch-sys/Cargo.toml index 289bf176..44fcaed0 100644 --- a/torch-sys/Cargo.toml +++ b/torch-sys/Cargo.toml @@ -17,7 +17,7 @@ libc = "0.2.0" [build-dependencies] anyhow = "^1.0.60" -cc = "1.0.61" +cc = "1.2" ureq = { version = "2.6", optional = true, features = ["json"] } serde_json = { version = "1.0", optional = true } serde = { version = "1.0", optional = true, features = ["derive"] }