Add mark_human
authorYehuda Katz <wycats@gmail.com>
Thu, 19 Jun 2014 18:02:24 +0000 (11:02 -0700)
committerYehuda Katz <wycats@gmail.com>
Thu, 19 Jun 2014 18:02:24 +0000 (11:02 -0700)
src/cargo/util/errors.rs

index ff716fda3e453d31f18d6bc7570ef42f3b98756f..dc5367550cad63c3c3853c747c41de0bd26e9e11 100644 (file)
@@ -27,6 +27,12 @@ pub trait CargoError {
             is_human: self.is_human()
         }
     }
+
+    fn mark_human(self) -> Box<CargoError> {
+        let mut concrete = self.concrete();
+        concrete.is_human = true;
+        box concrete as Box<CargoError>
+    }
 }
 
 pub trait FromError<E> {