Skip to content

Commit

Permalink
rust2018: remove extern crate
Browse files Browse the repository at this point in the history
Signed-off-by: Levente Kurusa <[email protected]>
  • Loading branch information
levex committed Dec 23, 2018
1 parent 932a6e7 commit ed1e816
Show file tree
Hide file tree
Showing 9 changed files with 5 additions and 15 deletions.
2 changes: 2 additions & 0 deletions src/devices.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
use std::io::{Read, Write};
use std::path::PathBuf;

use log::*;

use crate::error::*;
use crate::error::ErrorKind::*;

Expand Down
2 changes: 2 additions & 0 deletions src/hierarchies.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ use std::io::BufRead;
use std::io::BufReader;
use std::path::{Path, PathBuf};

use log::*;

use crate::blkio::BlkIoController;
use crate::cpu::CpuController;
use crate::cpuacct::CpuAcctController;
Expand Down
3 changes: 1 addition & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#[macro_use]
extern crate log;
use log::*;

use std::fs::File;
use std::io::{BufRead, BufReader, Write};
Expand Down
1 change: 0 additions & 1 deletion tests/builder.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
//! Some simple tests covering the builder pattern for control groups.
extern crate cgroups;
use cgroups::*;
use cgroups::cpu::*;
use cgroups::devices::*;
Expand Down
4 changes: 0 additions & 4 deletions tests/cgroup.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
//! Simple unit tests about the control groups system.
extern crate cgroups;
use cgroups::{Cgroup, CgroupPid};

extern crate libc;
extern crate nix;

#[test]
fn test_tasks_iterator() {
let hier = cgroups::hierarchies::V1::new();
Expand Down
2 changes: 0 additions & 2 deletions tests/cpuset.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
extern crate cgroups;

use cgroups::cpuset::CpuSetController;
use cgroups::error::ErrorKind;
use cgroups::Cgroup;
Expand Down
1 change: 0 additions & 1 deletion tests/devices.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
//! Integration tests about the devices subsystem
extern crate cgroups;
use cgroups::devices::{DevicePermissions, DeviceType, DevicesController};
use cgroups::{Cgroup, DeviceResource};

Expand Down
3 changes: 0 additions & 3 deletions tests/pids.rs
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
//! Integration tests about the pids subsystem
extern crate cgroups;
use cgroups::pid::{PidController, PidMax};
use cgroups::Controller;
use cgroups::{Cgroup, CgroupPid, PidResources, Resources};

extern crate nix;
use nix::sys::wait::{waitpid, WaitStatus};
use nix::unistd::{fork, ForkResult, Pid};

extern crate libc;
use libc::pid_t;

use std::thread;
Expand Down
2 changes: 0 additions & 2 deletions tests/resources.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
//! Integration test about setting resources using `apply()`
extern crate cgroups;

use cgroups::pid::{PidController, PidMax};
use cgroups::{Cgroup, PidResources, Resources};

Expand Down

0 comments on commit ed1e816

Please sign in to comment.