User avatar
φ @fiore@shrimptest.bedwetting.club
5mo
@sodiboo @risc ok i tried to make a basic example but that works normally so i must be doing smth weird ? is there anything thats escaping me here :P
tokio::spawn(async move {
    let mut buffer = String::new();
    tls_reader.read_to_string(&mut buffer).await?;
    for line in buffer.lines() {
        let line: MessageString = line.into();
        let mut tokens = toys::token::tokenize(&line);
        if let Ok(message) = Parser::parse_message(&mut tokens) {
            eprintln!("[ {} ] {:?}", "LOG".cyan(), message);
        };
        eprintln!("[  {}  ] {}", "<".blue(), line);
    }
    Ok(()) as anyhow::Result<()>
})