simplify exception_repr a bit

This commit is contained in:
Maxim Kurnikov committed 2019-06-24 18:13:18 +03:00
1 parent 82101d9f1a
commit 060cd75783
1 file changed
-1
-1
View File
@@ -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))