Update name of deprecated str::trim_right

This commit is contained in:
David Tolnay 2018-12-30 22:34:58 -05:00
parent 04ff22701d
commit 8304704f76
No known key found for this signature in database
GPG Key ID: F9BA143B95FF6D82

View File

@ -617,7 +617,7 @@ where
// Make sure every prefix is an EOF error, except that a prefix of a
// number may be a valid number.
if !json_value.is_number() {
for (i, _) in s.trim_right().char_indices() {
for (i, _) in s.trim_end().char_indices() {
assert!(from_str::<Value>(&s[..i]).unwrap_err().is_eof());
assert!(from_str::<IgnoredAny>(&s[..i]).unwrap_err().is_eof());
}