diff options
author | Ms2ger <ms2ger@gmail.com> | 2015-03-21 18:44:39 +0100 |
---|---|---|
committer | Ms2ger <ms2ger@gmail.com> | 2015-03-21 18:44:39 +0100 |
commit | ba87666cdbf4addf9340aad0dd0cf9574b79091c (patch) | |
tree | 6a7b6b4d0a28f0302029f0c82ab3c63290287d6e /components/util/time.rs | |
parent | 29a36adbe7d87fb38ba9bef3a718c6c823fb5977 (diff) | |
download | servo-ba87666cdbf4addf9340aad0dd0cf9574b79091c.tar.gz servo-ba87666cdbf4addf9340aad0dd0cf9574b79091c.zip |
Update some code that's feature-gated under core.
Diffstat (limited to 'components/util/time.rs')
-rw-r--r-- | components/util/time.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/components/util/time.rs b/components/util/time.rs index c9cf32c0617..1cae21719d4 100644 --- a/components/util/time.rs +++ b/components/util/time.rs @@ -44,7 +44,7 @@ impl Formatable for Option<TimerMetadata> { match self { // TODO(cgaebel): Center-align in the format strings as soon as rustc supports it. &Some(ref meta) => { - let url = meta.url.as_slice(); + let url = &*meta.url; let url = if url.len() > 30 { &url[..30] } else { @@ -243,7 +243,7 @@ impl TimeProfiler { if data_len > 0 { let (mean, median, min, max) = (data.iter().map(|&x|x).sum() / (data_len as f64), - data.as_slice()[data_len / 2], + data[data_len / 2], data.iter().fold(f64::INFINITY, |a, &b| a.min(b)), data.iter().fold(-f64::INFINITY, |a, &b| a.max(b))); println!("{:-35}{} {:15.4} {:15.4} {:15.4} {:15.4} {:15}", |