Fix package name for Rust naming convention
This commit is contained in:
parent
f98ab3eb82
commit
f2ceea0cc1
2 changed files with 6 additions and 3 deletions
|
@ -1,5 +1,5 @@
|
|||
[package]
|
||||
name = "Oxide"
|
||||
name = "oxide"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
|
||||
|
|
|
@ -5,17 +5,20 @@ fn main() {
|
|||
}
|
||||
|
||||
fn get_sys_info() {
|
||||
// Please note that we use "new_all" to ensure that all list of
|
||||
// components, network interfaces, disks and users are already
|
||||
// filled!
|
||||
let mut sys = System::new_all();
|
||||
|
||||
// First we update all information of our `System` struct.
|
||||
sys.refresh_all();
|
||||
|
||||
// Display system information:
|
||||
// Print system information:
|
||||
println!("System name: {:?}", System::name());
|
||||
println!("Kernel version: {:?}", System::kernel_version());
|
||||
println!("System OS version: {:?}", System::os_version());
|
||||
println!("System host name: {:?}", System::host_name());
|
||||
|
||||
// Number of CPUs:
|
||||
// Print number of CPUs:
|
||||
println!("Number of CPUs: {}", sys.cpus().len());
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue