aboutsummaryrefslogtreecommitdiff
path: root/src/message.rs
diff options
context:
space:
mode:
authorAkshay <[email protected]>2021-04-06 10:24:54 +0100
committerAkshay <[email protected]>2021-04-06 10:24:54 +0100
commitc84c38544bc6e81f0b0482e4e82b6c95848c1a0c (patch)
tree3ae2f3387ba5ef56a7f7c3304dc029ae7845f175 /src/message.rs
parent3f5b917c6ced370d940774b51ff89cec0d03c562 (diff)
apply clippy lints
Diffstat (limited to 'src/message.rs')
-rw-r--r--src/message.rs20
1 files changed, 13 insertions, 7 deletions
diff --git a/src/message.rs b/src/message.rs
index 958dd68..b090b4d 100644
--- a/src/message.rs
+++ b/src/message.rs
@@ -67,13 +67,19 @@ where
67 } 67 }
68} 68}
69 69
70impl Into<Color> for MessageKind { 70impl std::default::Default for Message {
71 fn into(self) -> Color { 71 fn default() -> Self {
72 match self { 72 Message::new()
73 Self::Error => PINK, 73 }
74 Self::Info => WHITE, 74}
75 Self::Hint => CYAN, 75
76 Self::LispResult => GREY, 76impl From<MessageKind> for Color {
77 fn from(msg: MessageKind) -> Color {
78 match msg {
79 MessageKind::Error => PINK,
80 MessageKind::Info => WHITE,
81 MessageKind::Hint => CYAN,
82 MessageKind::LispResult => GREY,
77 } 83 }
78 } 84 }
79} 85}