diff options
author | Sam Tay <sam.chong.tay@gmail.com> | 2020-06-07 18:01:22 -0700 |
---|---|---|
committer | Sam Tay <sam.chong.tay@gmail.com> | 2020-06-07 18:01:22 -0700 |
commit | 556612119a77d8235904819a2f17a8ed82ca304c (patch) | |
tree | e59ee68b900af1744e4d5ba48830df080e9b1052 /src/error.rs | |
parent | 1942882d2825b205cec89c8cb5990d637ebdf838 (diff) |
Start using termimad
Getting feet wet by scrapping manual crossterm calls and just letting termimad do the heavy lifting via markdown
Diffstat (limited to 'src/error.rs')
-rw-r--r-- | src/error.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/error.rs b/src/error.rs index b6046af..b2afd60 100644 --- a/src/error.rs +++ b/src/error.rs @@ -15,6 +15,7 @@ pub enum ErrorKind { Panic, EmptySites, NoResults, + Termimad(termimad::Error), } impl From<&str> for Error { @@ -26,6 +27,15 @@ impl From<&str> for Error { } } +impl From<termimad::Error> for Error { + fn from(err: termimad::Error) -> Self { + Error { + kind: ErrorKind::Termimad(err), + error: String::from(""), + } + } +} + // TODO add others impl Error { pub fn malformed(path: &PathBuf) -> Self { |