Skip to content

Commit

Permalink
Merge pull request #1096 from GuillaumeGomez/remove-traits
Browse files Browse the repository at this point in the history
Remove `NetworkExt`, `CpuExt`, `GroupExt` and `ComponentsExt` traits
  • Loading branch information
GuillaumeGomez authored Oct 14, 2023
2 parents ae650f7 + a37d3c1 commit 12bb072
Show file tree
Hide file tree
Showing 45 changed files with 940 additions and 946 deletions.
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,7 @@ Otherwise, here is a little code sample:

```rust
use sysinfo::{
Components, ComponentsExt, Disks, NetworkExt, Networks,
System,
Components, Disks, Networks, System,
};

// Please note that we use "new_all" to ensure that all list of
Expand Down Expand Up @@ -100,7 +99,7 @@ Please remember that to have some up-to-date information, you need to call the e
`refresh` method. For example, for the CPU usage:

```rust,no_run
use sysinfo::{CpuExt, System};
use sysinfo::System;
let mut sys = System::new();
Expand Down
2 changes: 1 addition & 1 deletion benches/basic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
extern crate test;

use sysinfo::get_current_pid;
use sysinfo::{ComponentsExt, UsersExt};
use sysinfo::UsersExt;

#[bench]
fn bench_new(b: &mut test::Bencher) {
Expand Down
5 changes: 1 addition & 4 deletions examples/simple.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,7 @@
use std::io::{self, BufRead, Write};
use std::str::FromStr;
use sysinfo::Signal::*;
use sysinfo::{
Components, ComponentsExt, CpuExt, Disks, NetworkExt, Networks, Pid, Signal, System, UserExt,
Users, UsersExt,
};
use sysinfo::{Components, Disks, Networks, Pid, Signal, System, UserExt, Users, UsersExt};

const signals: &[Signal] = &[
Hangup,
Expand Down
16 changes: 0 additions & 16 deletions md_doc/component.md

This file was deleted.

11 changes: 0 additions & 11 deletions md_doc/components.md

This file was deleted.

1 change: 0 additions & 1 deletion md_doc/cpu.md

This file was deleted.

1 change: 0 additions & 1 deletion md_doc/network_data.md

This file was deleted.

2 changes: 1 addition & 1 deletion src/c_interface.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Take a look at the license at the top of the repository in the LICENSE file.

use crate::{CpuExt, Disks, NetworkExt, Networks, Pid, Process, System};
use crate::{Disks, Networks, Pid, Process, System};
use libc::{self, c_char, c_float, c_uint, c_void, size_t};
use std::borrow::BorrowMut;
use std::ffi::CString;
Expand Down
Loading

0 comments on commit 12bb072

Please sign in to comment.