Skip to content

Commit 371b29d

Browse files
committed
style: Make clippy happy
1 parent ad773ab commit 371b29d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/file/format/toml.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ pub(crate) fn parse(
1515

1616
fn from_toml_value(uri: Option<&String>, value: &toml::Value) -> Value {
1717
match *value {
18-
toml::Value::String(ref value) => Value::new(uri, value.to_string()),
18+
toml::Value::String(ref value) => Value::new(uri, value.clone()),
1919
toml::Value::Float(value) => Value::new(uri, value),
2020
toml::Value::Integer(value) => Value::new(uri, value),
2121
toml::Value::Boolean(value) => Value::new(uri, value),

src/file/format/yaml.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ fn from_yaml_value(
3737
value
3838
.parse::<f64>()
3939
.map_err(|_| {
40-
Box::new(FloatParsingError(value.to_string())) as Box<(dyn Error + Send + Sync)>
40+
Box::new(FloatParsingError(value.clone())) as Box<(dyn Error + Send + Sync)>
4141
})
4242
.map(ValueKind::Float)
4343
.map(|f| Value::new(uri, f))

0 commit comments

Comments
 (0)