mirror of
https://github.com/nushell/nushell.git
synced 2025-08-10 09:48:18 +02:00
Fix warnings for Rust 1.51 (#3214)
* Fix warnings for Rust 1.51 * More fixes * More fixes
This commit is contained in:
@ -19,16 +19,16 @@ pub enum ErrorCode {
|
||||
Custom(String),
|
||||
|
||||
/// EOF while parsing a list.
|
||||
EOFWhileParsingList,
|
||||
EofWhileParsingList,
|
||||
|
||||
/// EOF while parsing an object.
|
||||
EOFWhileParsingObject,
|
||||
EofWhileParsingObject,
|
||||
|
||||
/// EOF while parsing a string.
|
||||
EOFWhileParsingString,
|
||||
EofWhileParsingString,
|
||||
|
||||
/// EOF while parsing a JSON value.
|
||||
EOFWhileParsingValue,
|
||||
EofWhileParsingValue,
|
||||
|
||||
/// Expected this character to be a `':'`.
|
||||
ExpectedColon,
|
||||
@ -76,10 +76,10 @@ impl fmt::Debug for ErrorCode {
|
||||
|
||||
match *self {
|
||||
ErrorCode::Custom(ref msg) => write!(f, "{}", msg),
|
||||
ErrorCode::EOFWhileParsingList => "EOF while parsing a list".fmt(f),
|
||||
ErrorCode::EOFWhileParsingObject => "EOF while parsing an object".fmt(f),
|
||||
ErrorCode::EOFWhileParsingString => "EOF while parsing a string".fmt(f),
|
||||
ErrorCode::EOFWhileParsingValue => "EOF while parsing a value".fmt(f),
|
||||
ErrorCode::EofWhileParsingList => "EOF while parsing a list".fmt(f),
|
||||
ErrorCode::EofWhileParsingObject => "EOF while parsing an object".fmt(f),
|
||||
ErrorCode::EofWhileParsingString => "EOF while parsing a string".fmt(f),
|
||||
ErrorCode::EofWhileParsingValue => "EOF while parsing a value".fmt(f),
|
||||
ErrorCode::ExpectedColon => "expected `:`".fmt(f),
|
||||
ErrorCode::ExpectedListCommaOrEnd => "expected `,` or `]`".fmt(f),
|
||||
ErrorCode::ExpectedObjectCommaOrEnd => "expected `,` or `}`".fmt(f),
|
||||
|
Reference in New Issue
Block a user