Remove symbol error type

This commit is contained in:
Adrian Heine 2017-02-07 13:54:06 +01:00
parent 55f2cfae95
commit 4be608a002
10 changed files with 85 additions and 108 deletions

View file

@ -1,10 +1,10 @@
use std::borrow::Cow;
use std::error::Error;
use std::fmt::Display;
pub trait Symbol: Display {
type Error: Error;
fn target_reached(&self) -> Result<bool, Self::Error>;
fn execute(&self) -> Result<(), Self::Error>;
fn target_reached(&self) -> Result<bool, Box<Error>>;
fn execute(&self) -> Result<(), Box<Error>>;
}
pub mod file;