Skip to content

Commit 6f85a44

Browse files
committed
cargo fmt
1 parent cf40050 commit 6f85a44

File tree

5 files changed

+12
-6
lines changed

5 files changed

+12
-6
lines changed

parser/src/lexer.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -687,7 +687,9 @@ where
687687

688688
match self.chr0 {
689689
Some('0'..='9') => return Some(self.lex_number()),
690-
Some('_') | Some('a'..='z') | Some('A'..='Z') => return Some(self.lex_identifier()),
690+
Some('_') | Some('a'..='z') | Some('A'..='Z') => {
691+
return Some(self.lex_identifier())
692+
}
691693
Some('#') => {
692694
self.lex_comment();
693695
continue;

vm/src/obj/objobject.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
use super::objstr;
22
use super::objtype;
33
use crate::pyobject::{
4-
AttributeProtocol, IdProtocol, PyContext, PyFuncArgs, PyObjectPayload, PyObjectRef, PyResult,
5-
TypeProtocol, DictProtocol,
4+
AttributeProtocol, DictProtocol, IdProtocol, PyContext, PyFuncArgs, PyObjectPayload,
5+
PyObjectRef, PyResult, TypeProtocol,
66
};
77
use crate::vm::VirtualMachine;
88
use std::cell::RefCell;

vm/src/stdlib/mod.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,10 @@ pub type StdlibInitFunc = Box<dyn Fn(&PyContext) -> PyObjectRef>;
2525

2626
pub fn get_module_inits() -> HashMap<String, StdlibInitFunc> {
2727
let mut modules = HashMap::new();
28-
modules.insert("ast".to_string(), Box::new(ast::mk_module) as StdlibInitFunc);
28+
modules.insert(
29+
"ast".to_string(),
30+
Box::new(ast::mk_module) as StdlibInitFunc,
31+
);
2932
modules.insert("dis".to_string(), Box::new(dis::mk_module));
3033
modules.insert("json".to_string(), Box::new(json::mk_module));
3134
modules.insert("keyword".to_string(), Box::new(keyword::mk_module));

vm/src/sysmodule.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use crate::pyobject::{PyContext, PyFuncArgs, PyObjectRef, PyResult, TypeProtocol, DictProtocol};
1+
use crate::pyobject::{DictProtocol, PyContext, PyFuncArgs, PyObjectRef, PyResult, TypeProtocol};
22
use crate::vm::VirtualMachine;
33
use std::rc::Rc;
44
use std::{env, mem};

wasm/lib/src/browser_module.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,5 +134,6 @@ pub fn mk_module(ctx: &PyContext) -> PyObjectRef {
134134
}
135135

136136
pub fn setup_browser_module(vm: &mut VirtualMachine) {
137-
vm.stdlib_inits.insert(BROWSER_NAME.to_string(), Box::new(mk_module));
137+
vm.stdlib_inits
138+
.insert(BROWSER_NAME.to_string(), Box::new(mk_module));
138139
}

0 commit comments

Comments
 (0)