<commit_before>use std::io::{self, Read};
use std::sync::mpsc;
use std::thread;
use std::io::BufReader;
use std::io::BufRead;

use sys::tty::get_tty;

/// Construct an asynchronous handle to the TTY standard input, with a delimiter byte.
///
/// This has the same advantages as async_stdin(), but also allows specifying a delimiter byte. The
/// reader will stop reading after consuming the delimiter byte.
pub fn async_stdin_until(delimiter: u8) -> AsyncReader {
    let (send, recv) = mpsc::channel();

    thread::spawn(move || for i in get_tty().unwrap().bytes() {

        match i {
            Ok(byte) => {
                let end_of_stream = &byte == &delimiter;
                let send_error = send.send(Ok(byte)).is_err();

                if end_of_stream || send_error { return; }
            },
            Err(e) => { return; }
        }
    });
<commit_msg>Corrected all remaining build warnings<commit_after>use std::io::{self, Read};
use std::sync::mpsc;
use std::thread;

use sys::tty::get_tty;

/// Construct an asynchronous handle to the TTY standard input, with a delimiter byte.
///
/// This has the same advantages as async_stdin(), but also allows specifying a delimiter byte. The
/// reader will stop reading after consuming the delimiter byte.
pub fn async_stdin_until(delimiter: u8) -> AsyncReader {
    let (send, recv) = mpsc::channel();

    thread::spawn(move || for i in get_tty().unwrap().bytes() {

        match i {
            Ok(byte) => {
                let end_of_stream = &byte == &delimiter;
                let send_error = send.send(Ok(byte)).is_err();

                if end_of_stream || send_error { return; }
            },
            Err(_) => { return; }
        }
    });

{'fraction_non_alphanumeric': 0.1356521739130435, 'fraction_numerical': 0.0011594202898550724, 'mean_word_length': 2.5734989648033126, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4172899', 'n_tokens_mistral': 532, 'n_tokens_neox': 514, 'n_words': 160}