Transition to Rust 2018

Signed-off-by: Levente Kurusa <lkurusa@acm.org>
This commit is contained in:
Levente Kurusa
2018-12-23 16:31:05 +01:00
parent b5e0706d6a
commit 01a3c22829
18 changed files with 96 additions and 96 deletions

View File

@@ -6,10 +6,10 @@ use std::fs::File;
use std::io::{Read, Write};
use std::path::PathBuf;
use error::*;
use error::ErrorKind::*;
use crate::error::*;
use crate::error::ErrorKind::*;
use {
use crate::{
ControllIdentifier, ControllerInternal, Controllers, MemoryResources, Resources, Subsystem,
};
@@ -85,7 +85,7 @@ pub struct NumaStat {
fn parse_numa_stat(s: String) -> Result<NumaStat> {
// Parse the number of nodes
let nodes = (s.split_whitespace().collect::<Vec<_>>().len() - 8) / 8;
let _nodes = (s.split_whitespace().collect::<Vec<_>>().len() - 8) / 8;
let mut ls = s.lines();
let total_line = ls.next().unwrap();
let file_line = ls.next().unwrap();
@@ -697,7 +697,7 @@ fn read_string_from(mut file: File) -> Result<String> {
#[cfg(test)]
mod tests {
use memory::{
use crate::memory::{
parse_memory_stat, parse_numa_stat, parse_oom_control, MemoryStat, NumaStat, OomControl,
};