summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Beyer <matthias.beyer@ifm.com>2022-08-18 15:14:10 +0200
committerMatthias Beyer <matthias.beyer@ifm.com>2022-08-18 15:40:40 +0200
commitc75b2e84b2af06f6c7e271cbebb09c10034d3044 (patch)
tree54b15eaa6d02e772990eb14d4991736df4ba75b6
parent9677f3a0ac68ca4e55da871f39729199a2e6eae7 (diff)
Fix clippy: Remove unnecessary .to_string()
This fixes clippy::unnecessary_to_owned Signed-off-by: Matthias Beyer <matthias.beyer@ifm.com>
-rw-r--r--crates/core/c8y_smartrest/src/smartrest_deserializer.rs4
1 files changed, 1 insertions, 3 deletions
diff --git a/crates/core/c8y_smartrest/src/smartrest_deserializer.rs b/crates/core/c8y_smartrest/src/smartrest_deserializer.rs
index 35e42b53..654e1441 100644
--- a/crates/core/c8y_smartrest/src/smartrest_deserializer.rs
+++ b/crates/core/c8y_smartrest/src/smartrest_deserializer.rs
@@ -176,9 +176,7 @@ where
let date_string_end = &date_string.split('+').last();
date_string = match date_string_end {
Some(string) if !string.contains(':') => {
- date_string[0..str_size - 2].to_string()
- + ":"
- + &date_string[str_size - 2..str_size].to_string()
+ date_string[0..str_size - 2].to_string() + ":" + &date_string[str_size - 2..str_size]
}
_ => date_string,
};