Skip to content

Ysoding/tqdm-rs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Type-Driven API Design in Rust

learn from video

fn expensive_op() {
    thread::sleep(Duration::from_secs(1));
}

fn main() {
    let delims = ('{', '}');
    let v = [1, 2, 3, 4];
    for _ in (0..).progress() {
        expensive_op();
    }

    // v.iter().progress().with_delims(delims).with_bound()
    for _ in v.iter().progress().with_bound().with_delims(delims) {
        expensive_op();
    }
}

About

Type-Driven API Design in Rust

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages