File tree Expand file tree Collapse file tree 5 files changed +7
-7
lines changed Expand file tree Collapse file tree 5 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ term.clear_line()?;
39
39
40
40
## Colors and Styles
41
41
42
- ` console ` automaticaly detects when to use colors based on the tty flag. It also
42
+ ` console ` automatically detects when to use colors based on the tty flag. It also
43
43
provides higher level wrappers for styling text and other things that can be
44
44
displayed with the ` style ` function and utility types.
45
45
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 @@ -317,7 +317,7 @@ pub fn read_single_key(ctrlc_key: bool) -> io::Result<Key> {
317
317
let rv: io:: Result < Key > = read_single_key_impl ( fd) ;
318
318
c_result ( || unsafe { libc:: tcsetattr ( fd, libc:: TCSADRAIN , & original) } ) ?;
319
319
320
- // if the user hit ^C we want to signal SIGINT to outselves .
320
+ // if the user hit ^C we want to signal SIGINT to ourselves .
321
321
if let Err ( ref err) = rv {
322
322
if err. kind ( ) == io:: ErrorKind :: Interrupted {
323
323
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
InvalidUtf16Tuple :: MissingSecond
408
408
) ;
You can’t perform that action at this time.
0 commit comments