Skip to content

Commit 9bc5cd3

Browse files
authored
Fix typos (#630)
1 parent 9a50fd2 commit 9bc5cd3

File tree

7 files changed

+11
-11
lines changed

7 files changed

+11
-11
lines changed

src/ansi_support.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ fn enable_vt_processing() -> Result<()> {
3131
static SUPPORTS_ANSI_ESCAPE_CODES: AtomicBool = AtomicBool::new(false);
3232
static INITIALIZER: Once = Once::new();
3333

34-
/// Checks if the current terminal supports ansi escape sequences
34+
/// Checks if the current terminal supports ANSI escape sequences
3535
pub fn supports_ansi() -> bool {
3636
INITIALIZER.call_once(|| {
3737
// Some terminals on Windows like GitBash can't use WinAPI calls directly

src/command.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,25 +8,25 @@ use super::error::Result;
88
/// Crossterm provides a set of commands,
99
/// and there is no immediate reason to implement a command yourself.
1010
/// In order to understand how to use and execute commands,
11-
/// it is recommended that you take a look at [Command Api](../#command-api) chapter.
11+
/// it is recommended that you take a look at [Command API](../#command-api) chapter.
1212
pub trait Command {
1313
/// Write an ANSI representation of this command to the given writer.
1414
/// An ANSI code can manipulate the terminal by writing it to the terminal buffer.
1515
/// However, only Windows 10 and UNIX systems support this.
1616
///
17-
/// This method does not need to be accessed manually, as it is used by the crossterm's [Command Api](../#command-api)
17+
/// This method does not need to be accessed manually, as it is used by the crossterm's [Command API](../#command-api)
1818
fn write_ansi(&self, f: &mut impl fmt::Write) -> fmt::Result;
1919

2020
/// Execute this command.
2121
///
2222
/// Windows versions lower than windows 10 do not support ANSI escape codes,
2323
/// therefore a direct WinAPI call is made.
2424
///
25-
/// This method does not need to be accessed manually, as it is used by the crossterm's [Command Api](../#command-api)
25+
/// This method does not need to be accessed manually, as it is used by the crossterm's [Command API](../#command-api)
2626
#[cfg(windows)]
2727
fn execute_winapi(&self) -> Result<()>;
2828

29-
/// Returns whether the ansi code representation of this command is supported by windows.
29+
/// Returns whether the ANSI code representation of this command is supported by windows.
3030
///
3131
/// A list of supported ANSI escape codes
3232
/// can be found [here](https://docs.microsoft.com/en-us/windows/console/console-virtual-terminal-sequences).

src/event.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -472,7 +472,7 @@ pub enum KeyCode {
472472
End,
473473
/// Page up key.
474474
PageUp,
475-
/// Page dow key.
475+
/// Page down key.
476476
PageDown,
477477
/// Tab key.
478478
Tab,

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ pub mod terminal;
250250
pub mod tty;
251251

252252
#[cfg(windows)]
253-
/// A module that exposes one function to check if the current terminal supports ansi sequences.
253+
/// A module that exposes one function to check if the current terminal supports ANSI sequences.
254254
pub mod ansi_support;
255255
mod command;
256256
mod error;

src/style.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
//!
6262
//! ### Attributes
6363
//!
64-
//! How to appy terminal attributes to text.
64+
//! How to apply terminal attributes to text.
6565
//!
6666
//! Command API:
6767
//!
@@ -427,7 +427,7 @@ impl_display!(for PrintStyledContent<&'static str>);
427427
impl_display!(for ResetColor);
428428

429429
/// Utility function for ANSI parsing in Color and Colored.
430-
/// Gets the next element of `iter` and tries to parse it as a u8.
430+
/// Gets the next element of `iter` and tries to parse it as a `u8`.
431431
fn parse_next_u8<'a>(iter: &mut impl Iterator<Item = &'a str>) -> Option<u8> {
432432
iter.next().and_then(|s| s.parse().ok())
433433
}

src/terminal.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
//! - Input will not be forwarded to screen
5656
//! - Input will not be processed on enter press
5757
//! - Input will not be line buffered (input sent byte-by-byte to input buffer)
58-
//! - Special keys like backspace and CTL+C will not be processed by terminal driver
58+
//! - Special keys like backspace and CTRL+C will not be processed by terminal driver
5959
//! - New line character will not be processed therefore `println!` can't be used, use `write!` instead
6060
//!
6161
//! Raw mode can be enabled/disabled with the [enable_raw_mode](terminal::enable_raw_mode) and [disable_raw_mode](terminal::disable_raw_mode) functions.

src/tty.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ pub trait IsTty {
2424
fn is_tty(&self) -> bool;
2525
}
2626

27-
/// On unix, the `isatty()` function returns true if a file
27+
/// On UNIX, the `isatty()` function returns true if a file
2828
/// descriptor is a terminal.
2929
#[cfg(unix)]
3030
impl<S: AsRawFd> IsTty for S {

0 commit comments

Comments
 (0)