Skip to content

Commit 8ac5020

Browse files
committed
Fixes for the latest rustc.
1 parent 4ce3728 commit 8ac5020

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

examples/yolo/darknet.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ impl Darknet {
241241
Ok(image_width)
242242
}
243243

244-
pub fn build_model(&self, vs: &nn::Path) -> Result<FuncT> {
244+
pub fn build_model(&self, vs: &nn::Path) -> Result<FuncT<'_>> {
245245
let mut blocks: Vec<(i64, Bl)> = vec![];
246246
let mut prev_channels: i64 = 3;
247247
for (index, block) in self.blocks.iter().enumerate() {

src/nn/var_store.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ impl VarStore {
149149
/// Variables are named and organized using paths. This function returns
150150
/// the top level path for the var store and can be combined with '/'
151151
/// to create sub-paths.
152-
pub fn root(&self) -> Path {
152+
pub fn root(&self) -> Path<'_> {
153153
Path { path: vec![], group: 0, var_store: self }
154154
}
155155

src/tensor/safetensors.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ impl View for SafeView<'_> {
9191
&self.shape
9292
}
9393

94-
fn data(&self) -> std::borrow::Cow<[u8]> {
94+
fn data(&self) -> std::borrow::Cow<'_, [u8]> {
9595
let mut data = vec![0; self.data_len()];
9696
let numel = self.tensor.numel();
9797
self.tensor.f_copy_data_u8(&mut data, numel).unwrap();

0 commit comments

Comments
 (0)