Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Problem solved with rustfmt
  • Loading branch information
LucaSforza committed May 14, 2023
commit 3715714a70e9e94b08ad9d9709f160428ba78b25
12 changes: 5 additions & 7 deletions vm/src/exceptions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1182,15 +1182,13 @@ pub(super) mod types {
)?;
Ok(())
}

#[pymethod(magic)]
fn reduce(
exc: PyBaseExceptionRef,
_vm: &VirtualMachine
) -> PyTupleRef {

fn reduce(exc: PyBaseExceptionRef, _vm: &VirtualMachine) -> PyTupleRef {
Comment thread
youknowone marked this conversation as resolved.
Outdated
let obj = exc.as_object().to_owned();
let mut result: Vec<PyObjectRef> = vec![obj.class().to_owned().into(),_vm.new_tuple((exc.get_arg(0).unwrap(),)).into()];
let mut result: Vec<PyObjectRef> = vec![
obj.class().to_owned().into(),
_vm.new_tuple((exc.get_arg(0).unwrap(),)).into(),
Comment thread
youknowone marked this conversation as resolved.
Outdated
];

if let Some(dict) = obj.dict().filter(|x| !x.is_empty()) {
result.push(dict.into());
Expand Down