diff --git a/src/editor.rs b/src/editor.rs index c68fa36..cb040c9 100644 --- a/src/editor.rs +++ b/src/editor.rs @@ -57,7 +57,7 @@ impl Default for Editor { }; Self { should_quit: false, - terminal: Terminal::default().expect("Failed to initialize terminal"), + terminal: Terminal::new().expect("Failed to initialize terminal"), document, cursor_position: Position::default(), offset: Position::default(), diff --git a/src/terminal.rs b/src/terminal.rs index de37319..e89fd08 100644 --- a/src/terminal.rs +++ b/src/terminal.rs @@ -18,7 +18,7 @@ pub struct Terminal { impl Terminal { /// # Errors /// Returns an error if terminal size cannot be retrieved or raw mode cannot be enabled. - pub fn default() -> Result { + pub fn new() -> Result { let size = termion::terminal_size()?; Ok(Self { size: Size {