1
0

Run clippy --fix

This commit is contained in:
Jeff 2023-08-28 13:47:45 -04:00
parent 21dae1ffad
commit 3481551926
4 changed files with 4 additions and 9 deletions

View File

@ -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))
} }
} }

View File

@ -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;

View File

@ -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>

View File

@ -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,