summaryrefslogtreecommitdiffstats
path: root/src/error.rs
diff options
context:
space:
mode:
authorSam Tay <sam.chong.tay@gmail.com>2020-06-07 18:01:22 -0700
committerSam Tay <sam.chong.tay@gmail.com>2020-06-07 18:01:22 -0700
commit556612119a77d8235904819a2f17a8ed82ca304c (patch)
treee59ee68b900af1744e4d5ba48830df080e9b1052 /src/error.rs
parent1942882d2825b205cec89c8cb5990d637ebdf838 (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.rs10
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 {