Skip to content

Commit 42c4339

Browse files
committed
Use get in store_cell
1 parent 59884ef commit 42c4339

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

vm/src/scope.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,7 @@ impl NameProtocol for Scope {
114114

115115
fn store_cell(&self, vm: &VirtualMachine, name: &str, value: PyObjectRef) {
116116
self.locals
117-
.iter()
118-
.nth(1)
117+
.get(1)
119118
.expect("no outer scope for non-local")
120119
.set_item(name, value, vm)
121120
.unwrap();

0 commit comments

Comments
 (0)