Skip to content

Commit

Permalink
Updated to 0.1.5 to include #6 changes
Browse files Browse the repository at this point in the history
+ Formatted errors.rs
  • Loading branch information
Genarito committed Jul 5, 2022
1 parent 1490e4d commit 8e72665
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 19 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ keywords = ["serialization", "deserialization", "serde", "serialize", "deseriali
license = "MIT"
name = "serde_gura"
repository = "https://github.com/gura-conf/serde-gura"
version = "0.1.4"
version = "0.1.5"

[dependencies]
gura = "0.5.0"
Expand Down
34 changes: 16 additions & 18 deletions src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,38 +67,36 @@ impl Display for Error {
Eof => f.write_str("Unexpected end of input"),
UnitNotSupported => f.write_str("Unit values are not supported in Gura"),

ExpectedBytes => f.write_str("Expected byte sequence"),
ExpectedBytes => f.write_str("Expected byte sequence"),
ExpectedBoolean => f.write_str("Expected boolean"),
ExpectedInteger => f.write_str("Expected integer"),
ExpectedFloat => f.write_str(
concat!(
"Expected float: perhaps you forgot decimal fractional part",
" (No implicit coversion between int and float, ",
"see https://gura.netlify.app/docs/spec#float)"
)
),
ExpectedChar => f.write_str("Expected char"),
ExpectedString => f.write_str("Expected string"),
ExpectedNull => f.write_str("Expected null value"),
ExpectedArray => f.write_str("Expected array"),
ExpectedFloat => f.write_str(concat!(
"Expected float: perhaps you forgot decimal fractional part",
" (No implicit coversion between int and float, ",
"see https://gura.netlify.app/docs/spec#float)"
)),
ExpectedChar => f.write_str("Expected char"),
ExpectedString => f.write_str("Expected string"),
ExpectedNull => f.write_str("Expected null value"),
ExpectedArray => f.write_str("Expected array"),
ExpectedArrayEnd => f.write_str("Expected array end"),

ExpectedMap => f.write_str("Expected map"),
ExpectedMap => f.write_str("Expected map"),
ExpectedMapColon => f.write_str("Expected colon at map"),
ExpectedMapComma => f.write_str("Expected comma at map"),
ExpectedMapEnd => f.write_str("Expected map end"),
ExpectedMapEnd => f.write_str("Expected map end"),

ExpectedEnum => f.write_str("Expected enum value"),
ExpectedEnum => f.write_str("Expected enum value"),

ExpectedObjectValue => f.write_str("Expected not empty object block"),
TrailingCharacters => f.write_str("Invalid trailing characters"),
TrailingCharacters => f.write_str("Invalid trailing characters"),

ExpectedUnitVariant => f.write_str("Expected unit variant at enum"),

ExpectedArrayComma => f.write_str("Expected comma at array"),
ExpectedArrayComma => f.write_str("Expected comma at array"),

InvalidType => f.write_str("Invalid type"),
ExpectedIdentifier => f.write_str("Expected identifier")
ExpectedIdentifier => f.write_str("Expected identifier"),
}
}
}
Expand Down

0 comments on commit 8e72665

Please sign in to comment.