test/docstrings fixes (#207)
This commit is contained in:
parent
2d4c1eec4d
commit
10af72ba2a
@ -43,9 +43,9 @@ impl TerminalInput {
|
|||||||
/// Not sure what 'raw mode' is, checkout the 'crossterm_screen' crate.
|
/// Not sure what 'raw mode' is, checkout the 'crossterm_screen' crate.
|
||||||
///
|
///
|
||||||
/// # Example
|
/// # Example
|
||||||
/// ```rust
|
/// ```ignore
|
||||||
/// let input = input();
|
/// let in = input();
|
||||||
/// match input.read_line() {
|
/// match in.read_line() {
|
||||||
/// Ok(s) => println!("string typed: {}", s),
|
/// Ok(s) => println!("string typed: {}", s),
|
||||||
/// Err(e) => println!("error: {}", e),
|
/// Err(e) => println!("error: {}", e),
|
||||||
/// }
|
/// }
|
||||||
@ -60,10 +60,9 @@ impl TerminalInput {
|
|||||||
|
|
||||||
/// Read one character from the user input
|
/// Read one character from the user input
|
||||||
///
|
///
|
||||||
/// ```rust
|
/// ```ignore
|
||||||
/// let input = input();
|
/// let in = input();
|
||||||
///
|
/// match in.read_char() {
|
||||||
/// match input.read_char() {
|
|
||||||
/// Ok(c) => println!("character pressed: {}", c),
|
/// Ok(c) => println!("character pressed: {}", c),
|
||||||
/// Err(e) => println!("error: {}", e),
|
/// Err(e) => println!("error: {}", e),
|
||||||
/// }
|
/// }
|
||||||
|
@ -487,10 +487,10 @@ where
|
|||||||
#[test]
|
#[test]
|
||||||
fn test_parse_utf8() {
|
fn test_parse_utf8() {
|
||||||
let st = "abcéŷ¤£€ù%323";
|
let st = "abcéŷ¤£€ù%323";
|
||||||
let ref mut bytes = st.bytes().map(|x| Ok(x));
|
let ref mut bytes = st.bytes();
|
||||||
let chars = st.chars();
|
let chars = st.chars();
|
||||||
for c in chars {
|
for c in chars {
|
||||||
let b = bytes.next().unwrap().unwrap();
|
let b = bytes.next().unwrap();
|
||||||
assert_eq!(c, parse_utf8_char(b, bytes).unwrap());
|
assert_eq!(c, parse_utf8_char(b, bytes).unwrap());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user