From 0bbaaa54f8060a2c21543e6ac22d7c18734c3f77 Mon Sep 17 00:00:00 2001 From: dvkt Date: Fri, 22 Nov 2019 18:22:27 -0800 Subject: [PATCH] be helpful --- src/main.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main.rs b/src/main.rs index 13dcd85..978c10e 100644 --- a/src/main.rs +++ b/src/main.rs @@ -69,6 +69,8 @@ fn user_input() { let mut input = String::new(); if let Ok((_col, row)) = termion::terminal_size() { y = row + 1; + } else { + panic!("can't determine terminal size."); } print!("{}\x1B[92;1m>> \x1B[0m", termion::cursor::Goto(1, y));