Skip to content

Commit 88c477f

Browse files
committed
Fix CR comments
1 parent e194254 commit 88c477f

File tree

3 files changed

+5
-8
lines changed

3 files changed

+5
-8
lines changed

Lib/test/support/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1640,7 +1640,7 @@ def disable_gc():
16401640
# finally:
16411641
# if have_gc:
16421642
# gc.enable()
1643-
pass
1643+
yield
16441644

16451645

16461646
def python_is_optimized():

vm/src/stdlib/faulthandler.rs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ use crate::frame::FrameRef;
22
use crate::function::OptionalArg;
33
use crate::pyobject::PyObjectRef;
44
use crate::vm::VirtualMachine;
5-
use std::cell::Ref;
65

76
fn dump_frame(frame: &FrameRef) {
87
eprintln!(
@@ -16,11 +15,9 @@ fn dump_frame(frame: &FrameRef) {
1615
fn dump_traceback(_file: OptionalArg<i64>, _all_threads: OptionalArg<bool>, vm: &VirtualMachine) {
1716
eprintln!("Stack (most recent call first):");
1817

19-
Ref::map(vm.frames.borrow(), |frames| {
20-
&for frame in frames {
21-
dump_frame(frame);
22-
}
23-
});
18+
for frame in vm.frames.borrow().iter() {
19+
dump_frame(frame);
20+
}
2421
}
2522

2623
fn enable(_file: OptionalArg<i64>, _all_threads: OptionalArg<bool>, _vm: &VirtualMachine) {

vm/src/stdlib/time_module.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,6 @@ pub fn make_module(vm: &VirtualMachine) -> PyObjectRef {
265265
"sleep" => ctx.new_rustfunc(time_sleep),
266266
"struct_time" => struct_time_type,
267267
"time" => ctx.new_rustfunc(time_time),
268-
"perf_counter" => ctx.new_rustfunc(time_time),
268+
"perf_counter" => ctx.new_rustfunc(time_time), // TODO: fix
269269
})
270270
}

0 commit comments

Comments
 (0)