aboutsummaryrefslogtreecommitdiff
path: root/src/app/message.rs
diff options
context:
space:
mode:
authorAkshay <[email protected]>2020-07-19 10:26:39 +0100
committerAkshay <[email protected]>2020-07-19 10:26:39 +0100
commit8a1dd86155823455e71ca0f73673214073a8a269 (patch)
tree41ecaffa397d4f86bb55d57b266dd6a65e19f2e0 /src/app/message.rs
parent9c858841c7566e79c0e05a6295e5f9bc86468d16 (diff)
add startup hint, fix watcher panics
Diffstat (limited to 'src/app/message.rs')
-rw-r--r--src/app/message.rs12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/app/message.rs b/src/app/message.rs
index 34d3293..65f0a5c 100644
--- a/src/app/message.rs
+++ b/src/app/message.rs
@@ -17,6 +17,18 @@ impl From<MessageKind> for Color {
17 } 17 }
18} 18}
19 19
20impl<T> From<T> for Message
21where
22 T: AsRef<str>,
23{
24 fn from(item: T) -> Self {
25 return Message {
26 msg: item.as_ref().to_string(),
27 kind: MessageKind::Info,
28 };
29 }
30}
31
20pub struct Message { 32pub struct Message {
21 msg: String, 33 msg: String,
22 kind: MessageKind, 34 kind: MessageKind,