Skip to content

Commit

Permalink
style: fixing clippy new rules
Browse files Browse the repository at this point in the history
  • Loading branch information
bpetit committed May 6, 2024
1 parent ee93d4a commit bd83e3a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/exporters/json.rs
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ impl JsonExporter {
let metric_disk_name = m.attributes.get("disk_name").unwrap();
if let Some(disk) = res.iter_mut().find(|x| metric_disk_name == &x.disk_name) {
info!("editing disk");
disk.disk_name = metric_disk_name.clone();
disk.disk_name.clone_from(metric_disk_name);
if m.name == "scaph_host_disk_available_bytes" {
disk.disk_available_bytes = m.metric_value.to_string();
} else if m.name == "scaph_host_disk_total_bytes" {
Expand Down
4 changes: 2 additions & 2 deletions src/exporters/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ pub struct MetricGenerator {
/// Tells MetricGenerator if it has to watch for containers.
#[cfg(feature = "containers")]
watch_containers: bool,
///
/// Last time, containers state has been checked.
#[cfg(feature = "containers")]
containers_last_check: String,
/// `containers` contains the containers descriptions when --containers is true
Expand All @@ -155,7 +155,7 @@ pub struct MetricGenerator {
/// Kubernetes pods
#[cfg(feature = "containers")]
pods: Vec<Pod>,
///
/// Last time pods state has been checked.
#[cfg(feature = "containers")]
pods_last_check: String,
}
Expand Down
4 changes: 2 additions & 2 deletions src/sensors/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -977,7 +977,7 @@ pub struct CPUSocket {
pub cpu_cores: Vec<CPUCore>,
/// Usage statistics records stored for this socket.
pub stat_buffer: Vec<CPUStat>,
///
/// Sensor-specific data that has been stored at the topology generation step.
#[allow(dead_code)]
pub sensor_data: HashMap<String, String>,
}
Expand Down Expand Up @@ -1351,7 +1351,7 @@ pub struct Domain {
pub record_buffer: Vec<Record>,
/// Maximum size of record_buffer, in kilobytes
pub buffer_max_kbytes: u16,
///
/// Sensor-specific data that has been stored at the topology generation step.
#[allow(dead_code)]
sensor_data: HashMap<String, String>,
}
Expand Down

0 comments on commit bd83e3a

Please sign in to comment.