mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Remove a workaround for a Rust bug.
We’ve upgraded to a Rust version that fixed mozilla/rust#13322.
This commit is contained in:
parent
aca8e1ea5f
commit
6a2a080355
1 changed files with 3 additions and 6 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue