Revert "Add: impl ImagError for ModuleError"
This reverts commit 7b1f9cfbac
.
This commit is contained in:
parent
4608b68628
commit
f1a67dba10
1 changed files with 0 additions and 31 deletions
|
@ -1,5 +1,4 @@
|
|||
use runtime::Runtime;
|
||||
use error::ImagError;
|
||||
use error::ImagErrorBase;
|
||||
|
||||
pub struct ModuleError {
|
||||
|
@ -25,36 +24,6 @@ impl ModuleError {
|
|||
|
||||
}
|
||||
|
||||
impl<'a> ImagError<'a> for ModuleError {
|
||||
fn print(&self, rt: &Runtime) {
|
||||
if self.base.longdesc.is_empty() {
|
||||
let s = format!("{}: {}\n\n{}\n\n",
|
||||
self.module_name,
|
||||
self.base.shortdesc,
|
||||
self.base.longdesc);
|
||||
rt.print(&s)
|
||||
} else {
|
||||
let s = format!("{}: {}\n",
|
||||
self.module_name,
|
||||
self.base.shortdesc);
|
||||
rt.print(&s)
|
||||
}
|
||||
}
|
||||
|
||||
fn print_short(&self, rt : &Runtime) {
|
||||
let s = format!("{}: {}\n", self.module_name, self.base.shortdesc);
|
||||
rt.print(&s)
|
||||
}
|
||||
|
||||
fn print_long(&self, rt : &Runtime) {
|
||||
let s = format!("{}: {}\n\n{}\n\n",
|
||||
self.module_name,
|
||||
self.base.shortdesc,
|
||||
self.base.longdesc);
|
||||
rt.print(&s)
|
||||
}
|
||||
}
|
||||
|
||||
pub trait Module {
|
||||
|
||||
fn new() -> Self;
|
||||
|
|
Loading…
Reference in a new issue