fix: avoid `should-implement-trait` Clippy warning

This commit is contained in:
Harsh Shandilya 2023-02-16 14:28:01 +00:00
parent 876f37efd2
commit 71d2d8a2ab
2 changed files with 2 additions and 2 deletions

View File

@ -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(),

View File

@ -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<Self, Error> {
pub fn new() -> Result<Self, Error> {
let size = termion::terminal_size()?;
Ok(Self {
size: Size {