example listing

This commit is contained in:
Chris West (Faux) 2017-07-13 14:00:05 +01:00
parent eaf79f46ed
commit 6acf62ca68

10
examples/list.rs Normal file
View File

@ -0,0 +1,10 @@
extern crate apt_pkg_native;
use apt_pkg_native::Cache;
fn main() {
let mut cache = Cache::get_singleton();
for item in cache.iter().map(|item| item.pretty_print()) {
println!("{}", item);
}
}