diff --git a/.clippy.toml b/.clippy.toml new file mode 100644 index 0000000..cc94ec5 --- /dev/null +++ b/.clippy.toml @@ -0,0 +1 @@ +upper-case-acronyms-aggressive = true diff --git a/src/cpu.rs b/src/cpu.rs index baaedad..0c7edd9 100644 --- a/src/cpu.rs +++ b/src/cpu.rs @@ -45,7 +45,7 @@ pub struct Cpu { /// The current state of the control group and its processes. #[derive(Debug)] -struct CFSQuotaAndPeriod { +struct CfsQuotaAndPeriod { quota: MaxValue, period: u64, } @@ -284,7 +284,7 @@ impl CpuController { impl CustomizedAttribute for CpuController {} -fn parse_cfs_quota_and_period(mut file: File) -> Result { +fn parse_cfs_quota_and_period(mut file: File) -> Result { let mut content = String::new(); file.read_to_string(&mut content) .map_err(|e| Error::with_cause(ReadFailed, e))?; @@ -299,5 +299,5 @@ fn parse_cfs_quota_and_period(mut file: File) -> Result { .parse::() .map_err(|e| Error::with_cause(ParseError, e))?; - Ok(CFSQuotaAndPeriod { quota, period }) + Ok(CfsQuotaAndPeriod { quota, period }) }