Skip to content

Commit

Permalink
Fix clippy lints
Browse files Browse the repository at this point in the history
  • Loading branch information
filmor committed Jan 8, 2024
1 parent 35d7aa9 commit f638454
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
1 change: 1 addition & 0 deletions rustler/src/serde/de.rs
Original file line number Diff line number Diff line change
Expand Up @@ -551,6 +551,7 @@ where

/// EnumDeserializerType
pub enum EnumDeserializerType {
#[allow(dead_code)]
Any,
Unit,
Newtype,
Expand Down
2 changes: 1 addition & 1 deletion rustler/src/serde/ser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ impl<'a> ser::Serializer for Serializer<'a> {

#[inline]
fn serialize_i16(self, v: i16) -> Result<Self::Ok, Self::Error> {
(v as i16).serialize(self)
v.serialize(self)
}

#[inline]
Expand Down
10 changes: 5 additions & 5 deletions rustler_tests/native/rustler_serde_test/src/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,19 +33,19 @@ pub fn test<'a>(

// Signed Integers
"i8 (min)" => run_test!(i8::min_value()),
"i8 (0)" => run_test!(0 as i8),
"i8 (0)" => run_test!(0_i8),
"i8 (max)" => run_test!(i8::max_value()),
"i16 (min)" => run_test!(i16::min_value()),
"i16 (0)" => run_test!(0 as i16),
"i16 (0)" => run_test!(0_i16),
"i16 (max)" => run_test!(i16::max_value()),
"i32 (min)" => run_test!(i32::min_value()),
"i32 (0)" => run_test!(0 as i32),
"i32 (0)" => run_test!(0_i32),
"i32 (max)" => run_test!(i32::max_value()),
"i64 (min)" => run_test!(i64::min_value()),
"i64 (0)" => run_test!(0 as i64),
"i64 (0)" => run_test!(0_i64),
"i64 (max)" => run_test!(i64::max_value()),
"i128 (min)" => run_test!(i128::min_value()),
"i128 (0)" => run_test!(0 as i128),
"i128 (0)" => run_test!(0_i128),
"i128 (max)" => run_test!(i128::max_value()),

// Unsigned Integers
Expand Down

0 comments on commit f638454

Please sign in to comment.