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 {
|
Self {
|
||||||
should_quit: false,
|
should_quit: false,
|
||||||
terminal: Terminal::default().expect("Failed to initialize terminal"),
|
terminal: Terminal::new().expect("Failed to initialize terminal"),
|
||||||
document,
|
document,
|
||||||
cursor_position: Position::default(),
|
cursor_position: Position::default(),
|
||||||
offset: Position::default(),
|
offset: Position::default(),
|
||||||
|
|
|
@ -18,7 +18,7 @@ pub struct Terminal {
|
||||||
impl Terminal {
|
impl Terminal {
|
||||||
/// # Errors
|
/// # Errors
|
||||||
/// Returns an error if terminal size cannot be retrieved or raw mode cannot be enabled.
|
/// 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()?;
|
let size = termion::terminal_size()?;
|
||||||
Ok(Self {
|
Ok(Self {
|
||||||
size: Size {
|
size: Size {
|
||||||
|
|
Loading…
Reference in New Issue