Fix expecting string for amount types
According to the `serde` docs: > This is used in error messages. The message should complete the > sentence “This Visitor expects to receive …”, for example the message > could be “an integer between 0 and 64”. The message should not be > capitalized and should not end with a period. Use a lower case character to start the string.
This commit is contained in:
parent
3658865a18
commit
980365097d
|
@ -230,7 +230,7 @@ pub mod as_sat {
|
|||
type Value = Option<X>;
|
||||
|
||||
fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
|
||||
write!(formatter, "An Option<{}64>", X::type_prefix(private::Token))
|
||||
write!(formatter, "an Option<{}64>", X::type_prefix(private::Token))
|
||||
}
|
||||
|
||||
fn visit_none<E>(self) -> Result<Self::Value, E>
|
||||
|
@ -301,7 +301,7 @@ pub mod as_btc {
|
|||
type Value = Option<X>;
|
||||
|
||||
fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
|
||||
write!(formatter, "An Option<f64>")
|
||||
write!(formatter, "an Option<f64>")
|
||||
}
|
||||
|
||||
fn visit_none<E>(self) -> Result<Self::Value, E>
|
||||
|
@ -372,7 +372,7 @@ pub mod as_str {
|
|||
type Value = Option<X>;
|
||||
|
||||
fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
|
||||
write!(formatter, "An Option<String>")
|
||||
write!(formatter, "an Option<String>")
|
||||
}
|
||||
|
||||
fn visit_none<E>(self) -> Result<Self::Value, E>
|
||||
|
|
Loading…
Reference in New Issue