Fix Rust 1.37.0 compiler warnings (#5530)

Looks like most usages of trait objects should have introduced
a type variable instead.
This commit is contained in:
Greg Fitzgerald
2019-08-15 14:00:09 -06:00
committed by GitHub
parent 75a2b74751
commit 471bc73a23
13 changed files with 33 additions and 25 deletions

View File

@ -236,7 +236,7 @@ impl Default for MetricsAgent {
impl MetricsAgent {
fn new(
writer: Arc<MetricsWriter + Send + Sync>,
writer: Arc<dyn MetricsWriter + Send + Sync>,
write_frequency_secs: Duration,
max_points_per_sec: usize,
) -> Self {
@ -251,7 +251,7 @@ impl MetricsAgent {
points: &[Point],
last_write_time: Instant,
max_points: usize,
writer: &Arc<MetricsWriter + Send + Sync>,
writer: &Arc<dyn MetricsWriter + Send + Sync>,
max_points_per_sec: usize,
) -> usize {
if points.is_empty() {
@ -296,7 +296,7 @@ impl MetricsAgent {
fn run(
receiver: &Receiver<MetricsCommand>,
writer: &Arc<MetricsWriter + Send + Sync>,
writer: &Arc<dyn MetricsWriter + Send + Sync>,
write_frequency_secs: Duration,
max_points_per_sec: usize,
) {