-
Notifications
You must be signed in to change notification settings - Fork 56
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
feat: add disk
provider
#138
Conversation
|
||
let mut list = Vec::new(); | ||
|
||
for disk in disks.iter() { |
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.
could use .map(...).collect::<Vec<_>>()
to simplify this and avoid the mut
on list
total_space: disk.total_space(), | ||
available_space: disk.available_space(), | ||
is_removable: disk.is_removable(), | ||
disk_type: format!("{:?}", disk.kind()), |
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.
disk.kind().display()
can be used instead of format!(...)
Much needed, thank you 🙌 To fix formatting you can use |
d3d9f12
to
f2318a3
Compare
e8ae8a9
to
1fa1aae
Compare
🎉 This PR is included in version 2.5.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
This PR adds a widget for disk information, uses the
sysinfo
package that is already included within.