vthread 0.0.1

Bounded carrier-affine virtual threads for Rust
Documentation
1
2
3
4
5
6
7
8
9
use super::*;
use std::fmt::Write;
#[test]
fn unicode_truncation_respects_byte_limit() {
    let mut output = BoundedText::new(5);
    assert!(write!(output, "abcdé").is_err());
    assert_eq!(output.text, "abcd");
    assert!(output.truncated);
}