Fix inconsistent_struct_constructor Clippy warning

This commit is contained in:
Padraic Fanning committed 2021-05-07 17:00:38 -04:00
1 parent c86c7a1cfb
commit 0174e386a1
3 files changed
+4 -4

No files matched your search

+1 -1
View File
@@ -717,7 +717,7 @@ where
}
}
Ok(IndentationLevel { spaces, tabs })
Ok(IndentationLevel { tabs, spaces })
}
fn handle_indentations(&mut self) -> Result<(), LexicalError> {
+2 -2
View File
@@ -16,7 +16,7 @@ pub fn serialize<S>(
where
S: serde::Serializer,
{
PyObjectSerializer { vm, pyobject }.serialize(serializer)
PyObjectSerializer { pyobject, vm }.serialize(serializer)
}
#[inline]
@@ -39,7 +39,7 @@ pub struct PyObjectSerializer<'s> {
impl<'s> PyObjectSerializer<'s> {
pub fn new(vm: &'s VirtualMachine, pyobject: &'s PyObjectRef) -> Self {
PyObjectSerializer { vm, pyobject }
PyObjectSerializer { pyobject, vm }
}
fn clone_with_object(&self, pyobject: &'s PyObjectRef) -> PyObjectSerializer {
+1 -1
View File
@@ -143,10 +143,10 @@ impl PyContext {
let context = PyContext {
true_value,
false_value,
not_implemented,
none,
empty_tuple,
ellipsis,
not_implemented,
types,
exceptions,