apt-pkg-native/examples/list.rs
Chris West (Faux) dac9411a56 edition = 2018
2019-01-21 22:22:47 +00:00

16 lines
362 B
Rust

use itertools::Itertools;
use apt_pkg_native::simple;
use apt_pkg_native::Cache;
fn main() {
let mut cache = Cache::get_singleton();
for item in cache.iter().map(simple::BinaryPackageVersions::new) {
println!(
"{} [{}]",
item.pkg,
item.versions.iter().map(|x| format!("{}", x)).join(", ")
);
}
}