aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/style/errors.rs
diff options
context:
space:
mode:
authorMs2ger <ms2ger@gmail.com>2014-05-08 23:40:15 +0200
committerJack Moffitt <jack@metajack.im>2014-05-22 16:36:40 -0600
commiteaedeb07cb0c4fdda37f35057588e4a769fbe758 (patch)
treecdeb134482f06818f7d6dbad8e008882fcc336a5 /src/components/style/errors.rs
parent3644d0272c89336954358eb5005f884a9c89e8bc (diff)
downloadservo-eaedeb07cb0c4fdda37f35057588e4a769fbe758.tar.gz
servo-eaedeb07cb0c4fdda37f35057588e4a769fbe758.zip
Update Rust.
Diffstat (limited to 'src/components/style/errors.rs')
-rw-r--r--src/components/style/errors.rs7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/components/style/errors.rs b/src/components/style/errors.rs
index db3372bb9e4..38f11904d4b 100644
--- a/src/components/style/errors.rs
+++ b/src/components/style/errors.rs
@@ -2,7 +2,6 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use std::local_data;
use cssparser::ast::{SyntaxError, SourceLocation};
@@ -29,15 +28,15 @@ local_data_key!(silence_errors: bool)
pub fn log_css_error(location: SourceLocation, message: &str) {
// TODO eventually this will got into a "web console" or something.
- if local_data::get(silence_errors, |silenced| silenced.is_none()) {
+ if silence_errors.get().is_none() {
error!("{:u}:{:u} {:s}", location.line, location.column, message)
}
}
pub fn with_errors_silenced<T>(f: || -> T) -> T {
- local_data::set(silence_errors, true);
+ silence_errors.replace(Some(true));
let result = f();
- local_data::pop(silence_errors);
+ silence_errors.replace(None);
result
}