Skip to content

Commit 0e2430f

Browse files
committed
clippy: turn on lint upper_case_acronyms
cargo-clippy has moved the upper_case_acronyms lint to pedantic(removed from the default list), but we need the lint to keep names consistent and follow the rust naming conventions. Signed-off-by: Tim Zhang <[email protected]>
1 parent 5aa7e6c commit 0e2430f

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

.clippy.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
upper-case-acronyms-aggressive = true

src/cpu.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ pub struct Cpu {
4545

4646
/// The current state of the control group and its processes.
4747
#[derive(Debug)]
48-
struct CFSQuotaAndPeriod {
48+
struct CfsQuotaAndPeriod {
4949
quota: MaxValue,
5050
period: u64,
5151
}
@@ -284,7 +284,7 @@ impl CpuController {
284284

285285
impl CustomizedAttribute for CpuController {}
286286

287-
fn parse_cfs_quota_and_period(mut file: File) -> Result<CFSQuotaAndPeriod> {
287+
fn parse_cfs_quota_and_period(mut file: File) -> Result<CfsQuotaAndPeriod> {
288288
let mut content = String::new();
289289
file.read_to_string(&mut content)
290290
.map_err(|e| Error::with_cause(ReadFailed, e))?;
@@ -299,5 +299,5 @@ fn parse_cfs_quota_and_period(mut file: File) -> Result<CFSQuotaAndPeriod> {
299299
.parse::<u64>()
300300
.map_err(|e| Error::with_cause(ParseError, e))?;
301301

302-
Ok(CFSQuotaAndPeriod { quota, period })
302+
Ok(CfsQuotaAndPeriod { quota, period })
303303
}

0 commit comments

Comments
 (0)