From 2780afd1e1ce56cc03076d4100d5bb2bc9ee8a23 Mon Sep 17 00:00:00 2001 From: Elfein Landers Date: Fri, 4 Feb 2022 22:25:42 -0800 Subject: [PATCH] made a default for vterm --- ableos/src/experiments/vterm.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ableos/src/experiments/vterm.rs b/ableos/src/experiments/vterm.rs index 94eb18a..9acb188 100644 --- a/ableos/src/experiments/vterm.rs +++ b/ableos/src/experiments/vterm.rs @@ -115,8 +115,8 @@ pub struct Vterm { pub cursor_visible: bool, } -impl Vterm { - pub fn new() -> Self { +impl Default for Vterm { + fn default() -> Self { Vterm { characters: [[VtermCharacter { character: ' ', @@ -142,7 +142,9 @@ impl Vterm { }, } } +} +impl Vterm { /// Set the vterm cursor to the given position pub fn set_cursor_position(&mut self, x: u32, y: u32) { if x > VTERM_WIDTH {