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.
|
||||
///
|
||||
/// # Example
|
||||
/// ```rust
|
||||
/// let input = input();
|
||||
/// match input.read_line() {
|
||||
/// ```ignore
|
||||
/// let in = input();
|
||||
/// match in.read_line() {
|
||||
/// Ok(s) => println!("string typed: {}", s),
|
||||
/// Err(e) => println!("error: {}", e),
|
||||
/// }
|
||||
@ -60,10 +60,9 @@ impl TerminalInput {
|
||||
|
||||
/// Read one character from the user input
|
||||
///
|
||||
/// ```rust
|
||||
/// let input = input();
|
||||
///
|
||||
/// match input.read_char() {
|
||||
/// ```ignore
|
||||
/// let in = input();
|
||||
/// match in.read_char() {
|
||||
/// Ok(c) => println!("character pressed: {}", c),
|
||||
/// Err(e) => println!("error: {}", e),
|
||||
/// }
|
||||
|
@ -487,10 +487,10 @@ where
|
||||
#[test]
|
||||
fn test_parse_utf8() {
|
||||
let st = "abcéŷ¤£€ù%323";
|
||||
let ref mut bytes = st.bytes().map(|x| Ok(x));
|
||||
let ref mut bytes = st.bytes();
|
||||
let chars = st.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());
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user