File tree 5 files changed +7
-7
lines changed 5 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ term.clear_line()?;
38
38
39
39
## Colors and Styles
40
40
41
- ` console ` automaticaly detects when to use colors based on the tty flag. It also
41
+ ` console ` automatically detects when to use colors based on the tty flag. It also
42
42
provides higher level wrappers for styling text and other things that can be
43
43
displayed with the ` style ` function and utility types.
44
44
Original file line number Diff line number Diff line change @@ -8,9 +8,9 @@ use console::{style, Term};
8
8
9
9
fn write_chars ( ) -> io:: Result < ( ) > {
10
10
let term = Term :: stdout ( ) ;
11
- let ( heigth , width) = term. size ( ) ;
11
+ let ( height , width) = term. size ( ) ;
12
12
for x in 0 ..width {
13
- for y in 0 ..heigth {
13
+ for y in 0 ..height {
14
14
term. move_cursor_to ( x as usize , y as usize ) ?;
15
15
let text = if ( x + y) % 2 == 0 {
16
16
format ! ( "{}" , style( x % 10 ) . black( ) . on_red( ) )
Original file line number Diff line number Diff line change 33
33
//!
34
34
//! # Colors and Styles
35
35
//!
36
- //! `console` automaticaly detects when to use colors based on the tty flag. It also
36
+ //! `console` automatically detects when to use colors based on the tty flag. It also
37
37
//! provides higher level wrappers for styling text and other things that can be
38
38
//! displayed with the `style` function and utility types.
39
39
//!
56
56
//!
57
57
//! # Working with ANSI Codes
58
58
//!
59
- //! The crate provids the function `strip_ansi_codes` to remove ANSI codes
59
+ //! The crate provides the function `strip_ansi_codes` to remove ANSI codes
60
60
//! from a string as well as `measure_text_width` to calculate the width of a
61
61
//! string as it would be displayed by the terminal. Both of those together
62
62
//! are useful for more complex formatting.
Original file line number Diff line number Diff line change @@ -323,7 +323,7 @@ pub fn read_single_key(ctrlc_key: bool) -> io::Result<Key> {
323
323
let rv: io:: Result < Key > = read_single_key_impl ( fd) ;
324
324
c_result ( || unsafe { libc:: tcsetattr ( fd, libc:: TCSADRAIN , & original) } ) ?;
325
325
326
- // if the user hit ^C we want to signal SIGINT to outselves .
326
+ // if the user hit ^C we want to signal SIGINT to ourselves .
327
327
if let Err ( ref err) = rv {
328
328
if err. kind ( ) == io:: ErrorKind :: Interrupted {
329
329
if !ctrlc_key {
Original file line number Diff line number Diff line change @@ -402,7 +402,7 @@ pub fn read_single_key(_ctrlc_key: bool) -> io::Result<Key> {
402
402
// Confirm that there is a next character to read.
403
403
if get_key_event_count ( ) ? == 0 {
404
404
let message = format ! (
405
- "Read invlid utf16 {}: {}" ,
405
+ "Read invalid utf16 {}: {}" ,
406
406
unicode_char,
407
407
Utf16TupleError :: MissingSecond
408
408
) ;
You can’t perform that action at this time.
0 commit comments