Repository navigation
Isolated Processes 12: Refactor Result, visiblity, wrappers - #200
Conversation
c853048 to
4204f72
Compare
|
|
||
| let auxv_path = format!("/proc/{pid}/auxv"); | ||
| let auxv_file = process_inspector | ||
| .read_file(&auxv_path) |
There was a problem hiding this comment.
So, if you're confused about why I had to do this (explicitly make every API require a PathBuf instead of taking a impl Into<PathBuf>), it's because we're about to make ProcessInspector a dyn Trait -- And dyn Traits can't have generic arguments.
Unfortunately, this means I have to go to every call site and write some variation of .into(), PathBuf::from(), path.clone(), etc.
Shitty, but... Whatcha gonna do?
|
@gabrielesvelto - This is a lot of small changes, but honestly there's not a whole lot to see here - Mostly just replacing a bunch of uses of |
There are about to be a lot of methods returning Result<T, Error>, so let's just start using some specialized results to avoid repeating ourselves. Also, some of the visiblity on things could be cleaned up. And let's centralize some of the wrappers for things like FDs so the remote end can reuse them. There's not much to this, but it makes other reviews noisy so I thought it best to separate it out.
4204f72 to
b57e996
Compare
There are about to be a lot of methods returning Result<T, Error>, so let's just start using some specialized results to avoid repeating ourselves.
Also, some of the visiblity on things could be cleaned up.
And let's centralize some of the wrappers for things like FDs so the remote end can reuse them.
There's not much to this, but it makes other reviews noisy so I thought it best to separate it out.