This commit is contained in:
Chris West (Faux) 2017-07-13 22:11:05 +01:00
parent d935fa5fb7
commit 4ced3f985c
2 changed files with 6 additions and 4 deletions

View File

@ -9,6 +9,10 @@ use apt_pkg_native::simple;
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(", "));
println!(
"{} [{}]",
item.pkg,
item.versions.iter().map(|x| format!("{}", x)).join(", ")
);
}
}

View File

@ -193,9 +193,7 @@ impl<'c> VerView<'c> {
}
pub fn section(&self) -> Option<String> {
unsafe {
make_owned_ascii_string(raw::ver_iter_section(self.ptr))
}
unsafe { make_owned_ascii_string(raw::ver_iter_section(self.ptr)) }
}
pub fn source_package(&self) -> String {