mirror of
https://github.com/RustPython/RustPython.git
synced 2026-10-29 03:04:38 +08:00
Fix inconsistent_struct_constructor Clippy warning
This commit is contained in:
3 files changed
+4
-4
No files matched your search
+1
-1
@@ -717,7 +717,7 @@ where
|
||||
}
|
||||
}
|
||||
|
||||
Ok(IndentationLevel { spaces, tabs })
|
||||
Ok(IndentationLevel { tabs, spaces })
|
||||
}
|
||||
|
||||
fn handle_indentations(&mut self) -> Result<(), LexicalError> {
|
||||
|
||||
+2
-2
@@ -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
@@ -143,10 +143,10 @@ impl PyContext {
|
||||
let context = PyContext {
|
||||
true_value,
|
||||
false_value,
|
||||
not_implemented,
|
||||
none,
|
||||
empty_tuple,
|
||||
ellipsis,
|
||||
not_implemented,
|
||||
|
||||
types,
|
||||
exceptions,
|
||||
|
||||
Reference in new issue
Block a user