-
Notifications
You must be signed in to change notification settings - Fork 393
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update sysinfo version #921
Conversation
Hi @GuillaumeGomez, thanks very much for doing this. It looks like there are some relevant test failures, but let us know if you'd like us to finalise the PR now. |
Ah indeed! I'll fix the PR as soon as possible then. |
4691062
to
9f21643
Compare
The clippy lints seem buggy so just in case I put them into their own commit. |
CI is happy! \o/ |
Thanks @GuillaumeGomez. Would it also be an option for delta to work with native integer types, and only convert to the Perhaps another way of asking my question is -- I'm curious, can you explain why the |
The problem is that this native type isn't the same on all platforms, making it complicated to write one code to handle all platforms at once. With this wrapping, it's now possible. I added a common fallback with |
src/utils/process.rs
Outdated
(Pid::from_u32(2), 100, "-shell", None), | ||
( | ||
Pid::from_u32(3), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about moving all the Pid::from_u32(..)
calls into MockProcInfo::with(..)
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you think @dandavison ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I'd also prefer to continue to use native integers where possible, and only wrap as sysinfo::Pid
where necessary -- i.e. close to the library call boundaries.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fine by me! Will sent an update as soon as possible.
cf8f8e9
to
c3c549e
Compare
I removed the |
Thanks a lot @GuillaumeGomez! |
In the new
sysinfo
version, I turnedPid
into a newtype.