diff --git a/examples/simple.rs b/examples/simple.rs index dbdb693..d739482 100644 --- a/examples/simple.rs +++ b/examples/simple.rs @@ -1,12 +1,12 @@ extern crate libterm; -use libterm::{TermControl, IntoRawMode, Color, Mode, ReadExt}; +use libterm::{TermControl, IntoRawMode, Color, Mode}; use std::io::{Read, Write, stdout, stdin}; fn main() { let stdout = stdout(); let mut stdout = stdout.lock().into_raw_mode().unwrap(); - let mut stdin = stdin(); + let stdin = stdin(); stdout.goto(5, 5).unwrap(); stdout.clear().unwrap(); diff --git a/src/color.rs b/src/color.rs index 34aa0ef..c927b9c 100644 --- a/src/color.rs +++ b/src/color.rs @@ -33,7 +33,7 @@ pub enum Color { HiCyan, /// High-intensity white. HiWhite, - /// 216-color (6, 6, 6) RGB. + /// 216-color (r, g, b ≤ 5) RGB. Rgb(u8, u8, u8), /// Grayscale (max value: 24) Grayscale(u8), @@ -67,7 +67,7 @@ impl Color { } } - pub fn debug_check(self) { + fn debug_check(self) { match self { Rgb(r, g, b) => { debug_assert!(r <= 5, "Red color fragment (r = {}) is out of bound. Make sure r ≤ 5.", r);