We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3317149 commit 5fbf977Copy full SHA for 5fbf977
src/path/mod.rs
@@ -25,7 +25,7 @@ fn sindex_to_uindex(index: isize, len: usize) -> usize {
25
if index >= 0 {
26
index as usize
27
} else {
28
- len - (index.abs() as usize)
+ len - index.unsigned_abs()
29
}
30
31
src/ser.rs
@@ -126,11 +126,11 @@ impl<'a> ser::Serializer for &'a mut ConfigSerializer {
126
127
128
fn serialize_u64(self, v: u64) -> Result<Self::Ok> {
129
- if v > (i64::max_value() as u64) {
+ if v > (i64::MAX as u64) {
130
Err(ConfigError::Message(format!(
131
"value {} is greater than the max {}",
132
v,
133
- i64::max_value()
+ i64::MAX
134
)))
135
136
self.serialize_i64(v as i64)
0 commit comments