Apply cargo-fix

This commit is contained in:
Olivier 'reivilibre' 2022-01-08 15:20:47 +00:00
parent f8ec5f22b5
commit 451bf180b3
2 changed files with 6 additions and 22 deletions

View File

@ -1,17 +1,13 @@
use crate::config::MetricTransform;
use anyhow::{anyhow, bail};
use bare_metrics_core::structures::{
Frame, MetricDescriptor, MetricId, MetricKind, UnixTimestampMilliseconds,
};
use bare_metrics_reader::{MetricsLogReader, SeekToken};
use eframe::egui::{
Color32, Frame as EguiFrame, PointerButton, Pos2, Rect, Sense, Stroke, TextStyle, Ui, Vec2,
};
use hdrhistogram::Histogram;
use log::{debug, error, info};
use std::collections::{BTreeMap, HashMap};
use std::io::{Read, Seek};
use std::ops::{DerefMut, Mul, RangeInclusive};
use std::ops::{DerefMut, RangeInclusive};
use std::sync::atomic::{AtomicBool, Ordering};
use std::sync::mpsc::{Receiver, Sender};
use std::sync::{Arc, Mutex, RwLock};
@ -549,10 +545,10 @@ impl<R: Read + Seek> MetricsLogReaderManager<R> {
.insert(metric_id, unsummarised_histogram.summarise());
}
for (metric_id, gauge) in metrics_window.gauges.iter_mut() {
for (_metric_id, gauge) in metrics_window.gauges.iter_mut() {
gauge.summarise_in_place();
}
for (metric_id, counter) in metrics_window.counters.iter_mut() {
for (_metric_id, counter) in metrics_window.counters.iter_mut() {
counter.summarise_in_place();
}
@ -605,7 +601,7 @@ impl<R: Read + Seek> MetricsLogReaderManager<R> {
)?;
self.reader.seek(seek_token)?;
let (start_ts, frame) = self
let (_start_ts, frame) = self
.reader
.read_frame()?
.ok_or_else(|| anyhow!("Sought frame should exist"))?;

View File

@ -1,21 +1,9 @@
use crate::background_loader::MetricsLogReadingRequester;
use crate::config::MetricTransform;
use anyhow::{anyhow, bail};
use bare_metrics_core::structures::{
Frame, MetricDescriptor, MetricId, MetricKind, UnixTimestampMilliseconds,
};
use bare_metrics_reader::{MetricsLogReader, SeekToken};
use bare_metrics_core::structures::{MetricId, UnixTimestampMilliseconds};
use eframe::egui::{
Color32, Frame as EguiFrame, PointerButton, Pos2, Rect, Sense, Stroke, TextStyle, Ui, Vec2,
};
use hdrhistogram::Histogram;
use log::{debug, error, info};
use std::collections::{BTreeMap, HashMap};
use std::io::{Read, Seek};
use std::ops::{DerefMut, Mul, RangeInclusive};
use std::sync::atomic::{AtomicBool, Ordering};
use std::sync::mpsc::{Receiver, Sender};
use std::sync::{Arc, Mutex, RwLock};
use std::ops::{Mul, RangeInclusive};
/// Renderer for a bare metrics graph.
/// Should support rendering both line graphs and histograms.