Skip to content

Commit 5fbf977

Browse files
committed
style: Make clippy happy
1 parent 3317149 commit 5fbf977

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/path/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ fn sindex_to_uindex(index: isize, len: usize) -> usize {
2525
if index >= 0 {
2626
index as usize
2727
} else {
28-
len - (index.abs() as usize)
28+
len - index.unsigned_abs()
2929
}
3030
}
3131

src/ser.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,11 +126,11 @@ impl<'a> ser::Serializer for &'a mut ConfigSerializer {
126126
}
127127

128128
fn serialize_u64(self, v: u64) -> Result<Self::Ok> {
129-
if v > (i64::max_value() as u64) {
129+
if v > (i64::MAX as u64) {
130130
Err(ConfigError::Message(format!(
131131
"value {} is greater than the max {}",
132132
v,
133-
i64::max_value()
133+
i64::MAX
134134
)))
135135
} else {
136136
self.serialize_i64(v as i64)

0 commit comments

Comments
 (0)