Fix clippy warnings

This commit is contained in:
Fabrice Reix 2020-12-13 14:57:20 +01:00
parent 1788bd19d6
commit 018ed06b75
3 changed files with 5 additions and 5 deletions

View File

@ -271,7 +271,7 @@ fn status(reader: &mut Reader) -> ParseResult<'static, Status> {
Ok(value) => StatusValue::Specific(value),
Err(_) => {
return Err(Error {
pos: start.clone(),
pos: start,
recoverable: false,
inner: ParseError::Status {},
})

View File

@ -235,7 +235,7 @@ fn template_element_string(
} else if bracket {
bracket = false;
value.push('{');
encoded.push_str("{");
encoded.push('{');
value.push(c);
encoded.push_str(s.as_str());
} else {

View File

@ -62,7 +62,7 @@ pub fn templatize(encoded_string: EncodedString) -> ParseResult<'static, Vec<Tem
state = State::Template {};
} else {
value.push('{');
encoded.push_str("{");
encoded.push('{');
value.push(c);
encoded.push_str(&s.clone());
@ -98,7 +98,7 @@ pub fn templatize(encoded_string: EncodedString) -> ParseResult<'static, Vec<Tem
} else {
value.push('}');
value.push(c);
encoded.push_str("}");
encoded.push('}');
encoded.push_str(&s.clone());
}
}
@ -109,7 +109,7 @@ pub fn templatize(encoded_string: EncodedString) -> ParseResult<'static, Vec<Tem
State::String {} => {}
State::FirstOpenBracket {} => {
value.push('{');
encoded.push_str("{");
encoded.push('{');
}
State::Template {} | State::FirstCloseBracket {} => {
return Err(error::Error {