浏览代码

apply review comment: use the runtime_error directly when possible

Tamo 1 周之前
父节点
当前提交
c82b39a6c8
共有 1 个文件被更改,包括 1 次插入2 次删除
  1. 1 2
      numbat/src/lib.rs

+ 1 - 2
numbat/src/lib.rs

@@ -764,8 +764,7 @@ impl Context {
 
                             if erc.is_none() {
                                 return Err(Box::new(NumbatError::RuntimeError(
-                                    self.interpreter
-                                        .runtime_error(RuntimeErrorKind::CouldNotLoadExchangeRates),
+                                    self.runtime_error(RuntimeErrorKind::CouldNotLoadExchangeRates),
                                 )));
                             }
                         }