Skip to content

Commit

Permalink
Lintfix
Browse files Browse the repository at this point in the history
  • Loading branch information
isbm committed Nov 25, 2024
1 parent e65b8c5 commit 302187a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions libsysinspect/src/util/dataconv.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Convenience functions to save the boilerplate.
*/

use rustpython_vm::{convert::ToPyObject, AsObject, PyObjectRef, VirtualMachine};
use rustpython_vm::{AsObject, PyObjectRef, VirtualMachine};
use serde_json::Value as JsonValue;
use serde_yaml::Value as YamlValue;

Expand Down Expand Up @@ -81,7 +81,7 @@ impl ExtValue for YamlValue {
}
YamlValue::String(s) => vm.new_pyobj(s),
YamlValue::Sequence(vec) => {
let py_list = vm.ctx.new_list(vec.into_iter().map(|item| item.to_pyobjectref(vm)).collect());
let py_list = vm.ctx.new_list(vec.iter().map(|item| item.to_pyobjectref(vm)).collect());
py_list.into()
}
YamlValue::Mapping(obj) => {
Expand Down Expand Up @@ -163,7 +163,7 @@ impl ExtValue for JsonValue {
}
JsonValue::String(s) => vm.new_pyobj(s),
JsonValue::Array(vec) => {
let py_list = vm.ctx.new_list(vec.into_iter().map(|item| item.to_pyobjectref(vm)).collect());
let py_list = vm.ctx.new_list(vec.iter().map(|item| item.to_pyobjectref(vm)).collect());
py_list.into()
}
JsonValue::Object(obj) => {
Expand Down

0 comments on commit 302187a

Please sign in to comment.