From 6a2a080355638651799da0e8cf6c35e68b9b22e5 Mon Sep 17 00:00:00 2001 From: Simon Sapin Date: Thu, 15 May 2014 19:27:31 +0100 Subject: [PATCH] Remove a workaround for a Rust bug. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We’ve upgraded to a Rust version that fixed mozilla/rust#13322. --- src/components/style/errors.rs | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/components/style/errors.rs b/src/components/style/errors.rs index 1abd833fc39..b8d811aebd1 100644 --- a/src/components/style/errors.rs +++ b/src/components/style/errors.rs @@ -21,11 +21,6 @@ impl>> Iterator for ErrorLoggerIterator } -// FIXME: go back to `()` instead of `bool` after upgrading Rust -// past 898669c4e203ae91e2048fb6c0f8591c867bccc6 -// Using bool is a work-around for https://github.com/mozilla/rust/issues/13322 -local_data_key!(silence_errors: bool) - /// Defaults to a no-op. /// Set a `RUST_LOG=style::errors` environment variable /// to log CSS parse errors to stderr. @@ -37,8 +32,10 @@ pub fn log_css_error(location: SourceLocation, message: &str) { } +local_data_key!(silence_errors: ()) + pub fn with_errors_silenced(f: || -> T) -> T { - silence_errors.replace(Some(true)); + silence_errors.replace(Some(())); let result = f(); silence_errors.replace(None); result