fix: avoid `should-implement-trait` Clippy warning
This commit is contained in:
parent
876f37efd2
commit
71d2d8a2ab
|
@ -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(),
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue