Fix clippy lints
This commit is contained in:
parent
60898cdf16
commit
7e05d35ba6
|
@ -2,6 +2,7 @@
|
|||
name = "instant-xml-macros"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
rust-version = "1.58"
|
||||
workspace = ".."
|
||||
license = "Apache-2.0 OR MIT"
|
||||
|
||||
|
|
|
@ -271,7 +271,7 @@ fn named_field(
|
|||
quote!(""),
|
||||
syn::Error::new(
|
||||
field_meta.ns.uri.span(),
|
||||
&format!("unknown prefix `{prefix}` (prefix must be defined on the field's type)"),
|
||||
format!("unknown prefix `{prefix}` (prefix must be defined on the field's type)"),
|
||||
)
|
||||
.into_compile_error(),
|
||||
),
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
name = "instant-xml"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
rust-version = "1.58"
|
||||
workspace = ".."
|
||||
license = "Apache-2.0 OR MIT"
|
||||
|
||||
|
|
|
@ -322,10 +322,10 @@ impl<'xml> Iterator for Context<'xml> {
|
|||
return Some(Ok(Node::Text(text.as_str())));
|
||||
}
|
||||
Ok(Token::Declaration { .. }) => match self.stack.is_empty() {
|
||||
false => return Some(Err(Error::UnexpectedToken(format!("{:?}", token)))),
|
||||
false => return Some(Err(Error::UnexpectedToken(format!("{token:?}")))),
|
||||
true => {}
|
||||
},
|
||||
Ok(token) => return Some(Err(Error::UnexpectedToken(format!("{:?}", token)))),
|
||||
Ok(token) => return Some(Err(Error::UnexpectedToken(format!("{token:?}")))),
|
||||
Err(e) => return Some(Err(Error::Parse(e))),
|
||||
}
|
||||
}
|
||||
|
|
|
@ -86,7 +86,7 @@ impl<'xml, W: fmt::Write + ?Sized> Serializer<'xml, W> {
|
|||
return Err(Error::UnexpectedState("invalid state for scalar"));
|
||||
}
|
||||
|
||||
self.output.write_fmt(format_args!("{}", value))?;
|
||||
self.output.write_fmt(format_args!("{value}"))?;
|
||||
self.state = State::Element;
|
||||
Ok(())
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue