diff options
author | Eric Huss <eric@huss.org> | 2019-04-02 10:50:33 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-04-02 10:50:33 -0700 |
commit | 166d8f08b3bb70b878664a6689904924c72ab7d6 (patch) | |
tree | 59ec93a9f82a600cbe7d48b75eefa1cad099b4e3 /src | |
parent | eda57879e307cb9e10efd62ba3cbead3f43d913d (diff) | |
parent | d1552ef0eeff95b1d5ce60787ae6cc6c63832615 (diff) | |
download | milf-rs-166d8f08b3bb70b878664a6689904924c72ab7d6.tar.gz milf-rs-166d8f08b3bb70b878664a6689904924c72ab7d6.zip |
Merge pull request #295 from ErichDonGubler/fix_warnings
Fix warnings for deprecated usages of trim_{left,right}_matches.
Diffstat (limited to 'src')
-rw-r--r-- | src/datetime.rs | 2 | ||||
-rw-r--r-- | src/de.rs | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/datetime.rs b/src/datetime.rs index 9239593..b77621a 100644 --- a/src/datetime.rs +++ b/src/datetime.rs @@ -99,7 +99,7 @@ impl fmt::Display for Time { write!(f, "{:02}:{:02}:{:02}", self.hour, self.minute, self.second)?; if self.nanosecond != 0 { let s = format!("{:09}", self.nanosecond); - write!(f, ".{}", s.trim_right_matches('0'))?; + write!(f, ".{}", s.trim_end_matches('0'))?; } Ok(()) } @@ -1321,7 +1321,7 @@ impl<'a> Deserializer<'a> { if suffix != "" { return Err(self.error(start, ErrorKind::NumberInvalid)); } - i64::from_str_radix(&prefix.replace("_", "").trim_left_matches('+'), radix) + i64::from_str_radix(&prefix.replace("_", "").trim_start_matches('+'), radix) .map_err(|_e| self.error(start, ErrorKind::NumberInvalid)) } @@ -1399,7 +1399,7 @@ impl<'a> Deserializer<'a> { } let mut number = integral - .trim_left_matches('+') + .trim_start_matches('+') .chars() .filter(|c| *c != '_') .collect::<String>(); |