From 0174e386a159c4cdd996504a319341e300b8a809 Mon Sep 17 00:00:00 2001 From: Padraic Fanning Date: Fri, 7 May 2021 17:00:38 -0400 Subject: [PATCH] Fix inconsistent_struct_constructor Clippy warning --- parser/src/lexer.rs | 2 +- vm/src/py_serde.rs | 4 ++-- vm/src/pyobject.rs | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/parser/src/lexer.rs b/parser/src/lexer.rs index ebfaa0a17..f5844f370 100644 --- a/parser/src/lexer.rs +++ b/parser/src/lexer.rs @@ -717,7 +717,7 @@ where } } - Ok(IndentationLevel { spaces, tabs }) + Ok(IndentationLevel { tabs, spaces }) } fn handle_indentations(&mut self) -> Result<(), LexicalError> { diff --git a/vm/src/py_serde.rs b/vm/src/py_serde.rs index 3345d90e0..ae6c5b9a6 100644 --- a/vm/src/py_serde.rs +++ b/vm/src/py_serde.rs @@ -16,7 +16,7 @@ pub fn serialize( 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 { diff --git a/vm/src/pyobject.rs b/vm/src/pyobject.rs index c8049880e..c2d342093 100644 --- a/vm/src/pyobject.rs +++ b/vm/src/pyobject.rs @@ -143,10 +143,10 @@ impl PyContext { let context = PyContext { true_value, false_value, - not_implemented, none, empty_tuple, ellipsis, + not_implemented, types, exceptions,