mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
remove extern crate
(#30311)
* remove extern crate * Update components/script_plugins/lib.rs Co-authored-by: Martin Robinson <mrobinson@igalia.com> --------- Co-authored-by: Martin Robinson <mrobinson@igalia.com>
This commit is contained in:
parent
a0cff6a085
commit
711dbbd4af
274 changed files with 415 additions and 429 deletions
|
@ -10,17 +10,14 @@
|
|||
//! It provides the same interface as https://github.com/rust-lang/rust/blob/5edaa7eefd76d4996dcf85dfc1c1a3f737087257/src/libstd/sys_common/remutex.rs
|
||||
//! so if those types are ever exported, we should be able to replace this implemtation.
|
||||
|
||||
#[macro_use]
|
||||
extern crate lazy_static;
|
||||
#[macro_use]
|
||||
extern crate log;
|
||||
|
||||
use std::cell::{Cell, UnsafeCell};
|
||||
use std::num::NonZeroUsize;
|
||||
use std::ops::Deref;
|
||||
use std::sync::atomic::{AtomicUsize, Ordering};
|
||||
use std::sync::{LockResult, Mutex, MutexGuard, PoisonError, TryLockError, TryLockResult};
|
||||
|
||||
use log::trace;
|
||||
|
||||
/// A type for thread ids.
|
||||
|
||||
// TODO: can we use the thread-id crate for this?
|
||||
|
@ -28,7 +25,7 @@ use std::sync::{LockResult, Mutex, MutexGuard, PoisonError, TryLockError, TryLoc
|
|||
#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
|
||||
pub struct ThreadId(NonZeroUsize);
|
||||
|
||||
lazy_static! {
|
||||
lazy_static::lazy_static! {
|
||||
static ref THREAD_COUNT: AtomicUsize = AtomicUsize::new(1);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue