7
This commit is contained in:
parent
ffb3a62b3d
commit
0ec66353c6
@ -10,7 +10,7 @@ fn parse_dpkg_output(output: &str) -> Vec<Package> {
|
|||||||
.lines()
|
.lines()
|
||||||
.filter_map(|line| {
|
.filter_map(|line| {
|
||||||
let mut parts = line.split('\t');
|
let mut parts = line.split('\t');
|
||||||
let name = parts.next()?.trim_matches(|c| c =='"').to_string();
|
let name = parts.next()?.trim().trim_matches(|c| c =='"').to_string();
|
||||||
let version = parts.next()?.to_string();
|
let version = parts.next()?.to_string();
|
||||||
Some(Package { name, version })
|
Some(Package { name, version })
|
||||||
})
|
})
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user