1
use std::fmt;
2

            
3
57
#[derive(Debug, PartialEq)]
4
pub enum Mode {
5
    Insert,
6
    Normal,
7
}
8

            
9
impl fmt::Display for Mode {
10
8
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
11
8
        match *self {
12
2
            Mode::Insert => write!(f, "INSERT"),
13
6
            Mode::Normal => write!(f, "NORMAL"),
14
        }
15
8
    }
16
}
17

            
18
#[cfg(test)]
19
#[path = "./mode_test.rs"]
20
mod mode_test;