Update hyper to 0.12

This commit is contained in:
Bastien Orivel 2018-08-27 18:36:52 +02:00
parent 95bfaa0a77
commit 024b40b39d
122 changed files with 3835 additions and 3448 deletions

View file

@ -14,7 +14,7 @@ unstable = ["jemalloc-sys"]
[dependencies]
profile_traits = {path = "../profile_traits"}
influent = "0.4"
influent = "0.5"
ipc-channel = "0.11"
heartbeats-simple = "0.4"
log = "0.4"
@ -22,6 +22,7 @@ serde = "1.0"
serde_json = "1.0"
servo_config = {path = "../config"}
time = "0.1.12"
tokio = "0.1"
[target.'cfg(target_os = "macos")'.dependencies]
task_info = {path = "../../support/rust-task_info"}

View file

@ -25,6 +25,7 @@ extern crate servo_config;
#[cfg(target_os = "macos")]
extern crate task_info;
extern crate time as std_time;
extern crate tokio;
#[allow(unsafe_code)]
mod heartbeats;

View file

@ -23,6 +23,8 @@ use std::io::{self, Write};
use std::path::Path;
use std::time::Duration;
use std_time::precise_time_ns;
use tokio;
use tokio::prelude::Future;
use trace_dump::TraceDump;
pub trait Formattable {
@ -470,9 +472,9 @@ impl Profiler {
if let Some(ref meta) = *meta {
measurement.add_tag("host", meta.url.as_str());
};
if client.write_one(measurement, None).is_err() {
warn!("Could not write measurement to profiler db");
}
tokio::run(client.write_one(measurement, None)
.map_err(|e| warn!("Could not write measurement to profiler db: {:?}", e)));
}
}
},