Appease clippy

```
error: called `Iterator::last` on a `DoubleEndedIterator`; this will needlessly iterate the entire iterator
   --> aya/src/programs/uprobe.rs:282:64
    |
282 |             let path = line.split(|b| b.is_ascii_whitespace()).last()?;
    |                                                                ^^^^^^ help: try: `next_back()`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#double_ended_iterator_last
```
reviewable/pr1135/r1
Tamir Duberstein 1 week ago
parent 114e7a6906
commit 69144a977e

@ -279,7 +279,7 @@ fn proc_maps_libs(pid: pid_t) -> Result<Vec<(OsString, PathBuf)>, io::Error> {
}
break;
}
let path = line.split(|b| b.is_ascii_whitespace()).last()?;
let path = line.split(|b| b.is_ascii_whitespace()).next_back()?;
let path = Path::new(OsStr::from_bytes(path));
path.is_absolute()
.then(|| {

Loading…
Cancel
Save