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:
Samson 2023-09-08 14:11:31 +02:00 committed by GitHub
parent a0cff6a085
commit 711dbbd4af
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
274 changed files with 415 additions and 429 deletions

View file

@ -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);
}