From 018ed06b7573ded7d5794cecec22599422ce79bf Mon Sep 17 00:00:00 2001 From: Fabrice Reix Date: Sun, 13 Dec 2020 14:57:20 +0100 Subject: [PATCH] Fix clippy warnings --- packages/hurl_core/src/parser/parsers.rs | 2 +- packages/hurl_core/src/parser/string.rs | 2 +- packages/hurl_core/src/parser/template.rs | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/hurl_core/src/parser/parsers.rs b/packages/hurl_core/src/parser/parsers.rs index e7cc48eec..4fad391ce 100644 --- a/packages/hurl_core/src/parser/parsers.rs +++ b/packages/hurl_core/src/parser/parsers.rs @@ -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 {}, }) diff --git a/packages/hurl_core/src/parser/string.rs b/packages/hurl_core/src/parser/string.rs index 14f78018e..69ee19a86 100644 --- a/packages/hurl_core/src/parser/string.rs +++ b/packages/hurl_core/src/parser/string.rs @@ -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 { diff --git a/packages/hurl_core/src/parser/template.rs b/packages/hurl_core/src/parser/template.rs index 2c06d78f6..eb3a510c5 100644 --- a/packages/hurl_core/src/parser/template.rs +++ b/packages/hurl_core/src/parser/template.rs @@ -62,7 +62,7 @@ pub fn templatize(encoded_string: EncodedString) -> ParseResult<'static, Vec ParseResult<'static, Vec ParseResult<'static, Vec {} State::FirstOpenBracket {} => { value.push('{'); - encoded.push_str("{"); + encoded.push('{'); } State::Template {} | State::FirstCloseBracket {} => { return Err(error::Error {