mirror of
https://github.com/servo/servo.git
synced 2025-08-02 20:20:14 +01:00
Make the style crate almost build on stable Rust.
`discriminant_value` will need to be replaced with something else later.
This commit is contained in:
parent
ea73c8efac
commit
00b6210519
41 changed files with 370 additions and 375 deletions
|
@ -2,13 +2,13 @@
|
|||
* 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 backtrace::Backtrace;
|
||||
use ipc_channel::ipc::IpcSender;
|
||||
use panicking;
|
||||
use serde::Serialize;
|
||||
use std::any::Any;
|
||||
#[cfg(feature = "servo")] use backtrace::Backtrace;
|
||||
#[cfg(feature = "servo")] use ipc_channel::ipc::IpcSender;
|
||||
#[cfg(feature = "servo")] use panicking;
|
||||
#[cfg(feature = "servo")] use serde::Serialize;
|
||||
#[cfg(feature = "servo")] use std::any::Any;
|
||||
#[cfg(feature = "servo")] use thread_state;
|
||||
use std::thread;
|
||||
use thread_state;
|
||||
|
||||
pub fn spawn_named<F>(name: String, f: F)
|
||||
where F: FnOnce() + Send + 'static
|
||||
|
@ -17,6 +17,7 @@ pub fn spawn_named<F>(name: String, f: F)
|
|||
}
|
||||
|
||||
/// Arrange to send a particular message to a channel if the thread fails.
|
||||
#[cfg(feature = "servo")]
|
||||
pub fn spawn_named_with_send_on_panic<F, Id>(name: String,
|
||||
state: thread_state::ThreadState,
|
||||
f: F,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue