File: from_file.rs

package info (click to toggle)
rust-quitters 0.1.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 92 kB
  • sloc: makefile: 4
file content (9 lines) | stat: -rw-r--r-- 297 bytes parent folder | download
1
2
3
4
5
6
7
8
9
fn main() -> Result<(), Box<dyn std::error::Error>> {
    let path = std::env::args_os().nth(1).unwrap();
    let file = std::fs::read(path)?;
    let versions = quitters::versions(&file);
    for (krate, version) in versions.iter() {
        println!("{} v{}", krate, version)
    }
    Ok(())
}