From 060cd75783d49d78b2526b70fa4ed914f2c353d8 Mon Sep 17 00:00:00 2001 From: Maxim Kurnikov Date: Mon, 24 Jun 2019 18:13:18 +0300 Subject: [PATCH] simplify exception_repr a bit --- vm/src/exceptions.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/vm/src/exceptions.rs b/vm/src/exceptions.rs index 067dbccfa..e5c6950f7 100644 --- a/vm/src/exceptions.rs +++ b/vm/src/exceptions.rs @@ -185,7 +185,6 @@ fn exception_repr(vm: &VirtualMachine, args: PyFuncArgs) -> PyResult { let exc_name = exc.class().name.clone(); let joined_str = match args_repr.len() { 0 => format!("{}()", exc_name), - 1 => format!("{}({})", exc_name, args_repr[0].to_string()), _ => format!("{}({})", exc_name, args_repr.join(", ")), }; Ok(vm.new_str(joined_str))