mirror of
https://github.com/RustPython/RustPython.git
synced 2026-10-29 03:04:38 +08:00
Reformat with rustfmt
This commit is contained in:
1 parent
b2f17a18ea
commit
bd89c4e32b
4 files changed
+8
-8
No files matched your search
+1
-1
@@ -4,7 +4,7 @@
|
||||
|
||||
pub use super::lexer::Location;
|
||||
use num_bigint::BigInt;
|
||||
use serde::{Serialize, Deserialize};
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
/*
|
||||
#[derive(Debug)]
|
||||
|
||||
+1
-1
@@ -7,12 +7,12 @@ extern crate unicode_xid;
|
||||
pub use super::token::Tok;
|
||||
use num_bigint::BigInt;
|
||||
use num_traits::Num;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use std::cmp::Ordering;
|
||||
use std::collections::HashMap;
|
||||
use std::str::FromStr;
|
||||
use unic_emoji_char::is_emoji_presentation;
|
||||
use unicode_xid::UnicodeXID;
|
||||
use serde::{Serialize, Deserialize};
|
||||
|
||||
#[derive(Clone, Copy, PartialEq, Debug)]
|
||||
struct IndentationLevel {
|
||||
|
||||
+1
-1
@@ -8,9 +8,9 @@
|
||||
use num_bigint::BigInt;
|
||||
use num_complex::Complex64;
|
||||
use rustpython_parser::ast;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use std::collections::{HashMap, HashSet};
|
||||
use std::fmt;
|
||||
use serde::{Serialize, Deserialize};
|
||||
|
||||
/// Primary container of a single code object. Each python function has
|
||||
/// a codeobject. Also a module has a codeobject.
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
use crate::obj::objcode::{PyCodeRef, PyCode};
|
||||
use crate::pyobject::{PyObjectRef, PyResult, IntoPyObject};
|
||||
use crate::vm::VirtualMachine;
|
||||
use crate::obj::objbytes::{PyBytes, PyBytesRef};
|
||||
use crate::bytecode;
|
||||
use crate::obj::objbytes::{PyBytes, PyBytesRef};
|
||||
use crate::obj::objcode::{PyCode, PyCodeRef};
|
||||
use crate::pyobject::{IntoPyObject, PyObjectRef, PyResult};
|
||||
use crate::vm::VirtualMachine;
|
||||
|
||||
fn marshal_dumps(co: PyCodeRef, vm: &VirtualMachine) -> PyResult {
|
||||
PyBytes::new(bincode::serialize(&co.code).unwrap()).into_pyobject(vm)
|
||||
@@ -21,4 +21,4 @@ pub fn make_module(vm: &VirtualMachine) -> PyObjectRef {
|
||||
"loads" => ctx.new_rustfunc(marshal_loads),
|
||||
"dumps" => ctx.new_rustfunc(marshal_dumps)
|
||||
})
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user