Run clippy --fix
This commit is contained in:
parent
21dae1ffad
commit
3481551926
@ -64,7 +64,7 @@ impl Tool for Transform {
|
|||||||
mapped_list.push(mapped_value);
|
mapped_list.push(mapped_value);
|
||||||
}
|
}
|
||||||
|
|
||||||
return Ok(Value::List(mapped_list));
|
Ok(Value::List(mapped_list))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -29,7 +29,7 @@ impl Tool for BarGraph {
|
|||||||
let argument = argument.as_list()?;
|
let argument = argument.as_list()?;
|
||||||
let mut bars = Vec::new();
|
let mut bars = Vec::new();
|
||||||
|
|
||||||
for (index, value) in argument.into_iter().enumerate() {
|
for (index, value) in argument.iter().enumerate() {
|
||||||
let list = value.as_list()?;
|
let list = value.as_list()?;
|
||||||
let mut name = None;
|
let mut name = None;
|
||||||
let mut height = None;
|
let mut height = None;
|
||||||
|
@ -518,7 +518,7 @@ impl<'de> Visitor<'de> for ValueVisitor {
|
|||||||
where
|
where
|
||||||
E: serde::de::Error,
|
E: serde::de::Error,
|
||||||
{
|
{
|
||||||
Ok(Value::Integer(v as i64))
|
Ok(Value::Integer(v))
|
||||||
}
|
}
|
||||||
|
|
||||||
fn visit_i128<E>(self, v: i128) -> std::result::Result<Self::Value, E>
|
fn visit_i128<E>(self, v: i128) -> std::result::Result<Self::Value, E>
|
||||||
|
@ -39,14 +39,9 @@ impl PartialEq for ValueType {
|
|||||||
(ValueType::List, ValueType::ListOf(_)) => true,
|
(ValueType::List, ValueType::ListOf(_)) => true,
|
||||||
(ValueType::ListOf(value_type), ValueType::ListExact(exact_list))
|
(ValueType::ListOf(value_type), ValueType::ListExact(exact_list))
|
||||||
| (ValueType::ListExact(exact_list), ValueType::ListOf(value_type)) => {
|
| (ValueType::ListExact(exact_list), ValueType::ListOf(value_type)) => {
|
||||||
if exact_list
|
exact_list
|
||||||
.iter()
|
.iter()
|
||||||
.all(|exact_type| exact_type == value_type.as_ref())
|
.all(|exact_type| exact_type == value_type.as_ref())
|
||||||
{
|
|
||||||
true
|
|
||||||
} else {
|
|
||||||
false
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
(ValueType::List, ValueType::List) => true,
|
(ValueType::List, ValueType::List) => true,
|
||||||
(ValueType::Empty, ValueType::Empty) => true,
|
(ValueType::Empty, ValueType::Empty) => true,
|
||||||
|
Loading…
Reference in New Issue
Block a user