diff options
author | Akshay <[email protected]> | 2020-07-19 10:26:39 +0100 |
---|---|---|
committer | Akshay <[email protected]> | 2020-07-19 10:26:39 +0100 |
commit | 8a1dd86155823455e71ca0f73673214073a8a269 (patch) | |
tree | 41ecaffa397d4f86bb55d57b266dd6a65e19f2e0 /src/app/message.rs | |
parent | 9c858841c7566e79c0e05a6295e5f9bc86468d16 (diff) |
add startup hint, fix watcher panics
Diffstat (limited to 'src/app/message.rs')
-rw-r--r-- | src/app/message.rs | 12 |
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 | ||
20 | impl<T> From<T> for Message | ||
21 | where | ||
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 | |||
20 | pub struct Message { | 32 | pub struct Message { |
21 | msg: String, | 33 | msg: String, |
22 | kind: MessageKind, | 34 | kind: MessageKind, |