mirror of
https://github.com/topjohnwu/Magisk.git
synced 2024-12-21 23:47:39 +00:00
Use to_string instead of to_owned
This commit is contained in:
parent
bf10496fa9
commit
866386e21f
@ -379,10 +379,10 @@ impl Cpio {
|
||||
fn ls(&self, path: Option<&str>, recursive: bool) {
|
||||
let path = path
|
||||
.map(norm_path)
|
||||
.map(|p| "/".to_owned() + p.as_str())
|
||||
.unwrap_or("".to_string());
|
||||
.filter(|p| !p.is_empty())
|
||||
.map_or("".to_string(), |p| "/".to_string() + p.as_str());
|
||||
for (name, entry) in &self.entries {
|
||||
let p = "/".to_owned() + name.as_str();
|
||||
let p = "/".to_string() + name.as_str();
|
||||
if !p.starts_with(&path) {
|
||||
continue;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user