Make debug_check private, remove warnings from examples

This commit is contained in:
Ticki 2016-03-08 08:27:59 +01:00
parent 491facd4e7
commit a19d2e245d
2 changed files with 4 additions and 4 deletions

View File

@ -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();

View File

@ -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);