GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Auto-format: cargo fmt --all · RustPython/RustPython@b1f07db

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • crates/vm/src
    • frame.rs
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎crates/vm/src/frame.rs‎

Copy file name to clipboardExpand all lines: crates/vm/src/frame.rs
+22-18Lines changed: 22 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2324,7 +2324,8 @@ impl ExecutingFrame<'_> {
23242324
};
23252325
self.push_value(match value {
23262326
Some(v) => v,
2327-
None => self.cell_ref(i)
2327+
None => self
2328+
.cell_ref(i)
23282329
.get()
23292330
.ok_or_else(|| self.unbound_cell_exception(i, vm))?,
23302331
});
@@ -2393,7 +2394,8 @@ impl ExecutingFrame<'_> {
23932394
}
23942395
Instruction::LoadDeref { i } => {
23952396
let idx = i.get(arg) as usize;
2396-
let x = self.cell_ref(idx)
2397+
let x = self
2398+
.cell_ref(idx)
23972399
.get()
23982400
.ok_or_else(|| self.unbound_cell_exception(idx, vm))?;
23992401
self.push_value(x);
@@ -8686,23 +8688,25 @@ impl fmt::Debug for Frame {
86868688
// SAFETY: Debug is best-effort; concurrent mutation is unlikely
86878689
// and would only affect debug output.
86888690
let iframe = unsafe { &*self.iframe.get() };
8689-
let stack_str = iframe.localsplus
8690-
.stack_as_slice()
8691-
.iter()
8692-
.fold(String::new(), |mut s, slot| {
8693-
match slot {
8694-
Some(elem) if elem.downcastable::<Self>() => {
8695-
s.push_str("\n > {frame}");
8696-
}
8697-
Some(elem) => {
8698-
core::fmt::write(&mut s, format_args!("\n > {elem:?}")).unwrap();
8699-
}
8700-
None => {
8701-
s.push_str("\n > NULL");
8691+
let stack_str =
8692+
iframe
8693+
.localsplus
8694+
.stack_as_slice()
8695+
.iter()
8696+
.fold(String::new(), |mut s, slot| {
8697+
match slot {
8698+
Some(elem) if elem.downcastable::<Self>() => {
8699+
s.push_str("\n > {frame}");
8700+
}
8701+
Some(elem) => {
8702+
core::fmt::write(&mut s, format_args!("\n > {elem:?}")).unwrap();
8703+
}
8704+
None => {
8705+
s.push_str("\n > NULL");
8706+
}
87028707
}
8703-
}
8704-
s
8705-
});
8708+
s
8709+
});
87068710
// TODO: fix this up
87078711
write!(
87088712
f,

0 commit comments

Comments
0 (0)
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.