Remove a workaround for a Rust bug.

We’ve upgraded to a Rust version that fixed mozilla/rust#13322.
This commit is contained in:
Simon Sapin 2014-05-15 19:27:31 +01:00
parent aca8e1ea5f
commit 6a2a080355

View file

@ -21,11 +21,6 @@ impl<T, I: Iterator<Result<T, SyntaxError>>> Iterator<T> 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<T>(f: || -> T) -> T {
silence_errors.replace(Some(true));
silence_errors.replace(Some(()));
let result = f();
silence_errors.replace(None);
result