remove Error::NotImplemented

This commit is contained in:
Svyatoslav Nikolsky
2017-05-03 10:41:01 +03:00
parent 8f2409d4ab
commit 6f668911a5
2 changed files with 1 additions and 4 deletions

View File

@ -27,8 +27,6 @@ pub enum Error {
Interpreter(String),
/// Trap.
Trap(String),
/// Functionality not yet implemented.
NotImplemented,
}
impl Into<String> for Error {
@ -46,7 +44,6 @@ impl Into<String> for Error {
Error::Interpreter(s) => s,
Error::Value(s) => s,
Error::Trap(s) => format!("trap: {}", s),
Error::NotImplemented => "not implemented".into(),
}
}
}

View File

@ -36,7 +36,7 @@ impl TableInstance {
for val in value {
match self.variable_type {
VariableType::AnyFunc => self.set(offset, RuntimeValue::AnyFunc(*val))?,
_ => return Err(Error::NotImplemented),
_ => return Err(Error::Table(format!("table of type {:?} is not supported", self.variable_type))),
}
offset += 1;
}