Skip to content

Commit

Permalink
chore: Fix clippy lints
Browse files Browse the repository at this point in the history
  • Loading branch information
uttarayan21 committed Dec 20, 2024
1 parent 46cba33 commit ffbf063
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
1 change: 0 additions & 1 deletion src/interpreter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ impl core::ops::Deref for TensorCallback {
/// The only two items tested are
/// - `Debug`
/// - `Release`
/// Which work fine
#[derive(Debug, Copy, Clone)]
#[cfg_attr(windows, repr(i32))]
#[cfg_attr(unix, repr(u32))]
Expand Down
6 changes: 3 additions & 3 deletions src/tensor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ impl DimensionType {
pub const NCHW: Self = Self::Caffe;
/// Caffe style dimensions with channel packed in 4 bytes or NC4HW4
pub const NC4HW4: Self = Self::CaffeC4;
pub(crate) fn to_mnn_sys(&self) -> mnn_sys::DimensionType {
pub(crate) fn to_mnn_sys(self) -> mnn_sys::DimensionType {
match self {
DimensionType::Caffe => mnn_sys::DimensionType::CAFFE,
DimensionType::CaffeC4 => mnn_sys::DimensionType::CAFFE_C4,
Expand Down Expand Up @@ -646,7 +646,7 @@ where
}

#[test]
pub fn test_tensor_borrowed() {
fn test_tensor_borrowed() {
let shape = [1, 2, 3];
let data = vec![1, 2, 3, 4, 5, 6];
let tensor = Tensor::<Ref<Host<i32>>>::borrowed(&shape, &data);
Expand All @@ -655,7 +655,7 @@ pub fn test_tensor_borrowed() {
}

#[test]
pub fn test_tensor_borrow_mut() {
fn test_tensor_borrow_mut() {
let shape = [1, 2, 3];
let mut data = vec![1, 2, 3, 4, 5, 6];
let mut tensor = Tensor::<RefMut<Host<i32>>>::borrowed_mut(&shape, &mut data);
Expand Down
1 change: 1 addition & 0 deletions tests/backend.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#![allow(unused_imports)]
pub mod common;
use common::*;
use mnn::ForwardType;
Expand Down

0 comments on commit ffbf063

Please sign in to comment.