Optimized mark_human for ConcreteCargoError
authorYehuda Katz <wycats@gmail.com>
Thu, 19 Jun 2014 18:52:49 +0000 (11:52 -0700)
committerYehuda Katz <wycats@gmail.com>
Thu, 19 Jun 2014 18:52:49 +0000 (11:52 -0700)
src/cargo/util/errors.rs

index f23a329a4531c6afd2dd9172fe17a646a987d6d3..771d1dc363f48e2657bf3ab12b5c9d797eef9a25 100644 (file)
@@ -201,6 +201,11 @@ impl CargoError for ConcreteCargoError {
         box self as Box<CargoError>
     }
 
+    fn mark_human(mut self) -> Box<CargoError> {
+        self.is_human = true;
+        box self as Box<CargoError>
+    }
+
     fn is_human(&self) -> bool {
         self.is_human
     }