0
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2025-02-01 12:16:11 -05:00
denoland-deno/resolvers/node/sync.rs
David Sherret e475749935
refactor: make PackageJsonCache injectable (#27800)
This used to be complicated to do, but is now trivial.
2025-01-24 09:50:25 -05:00

21 lines
496 B
Rust

// Copyright 2018-2025 the Deno authors. MIT license.
pub use inner::*;
#[cfg(feature = "sync")]
mod inner {
#![allow(clippy::disallowed_types)]
pub use core::marker::Send as MaybeSend;
pub use core::marker::Sync as MaybeSync;
pub use std::sync::Arc as MaybeArc;
}
#[cfg(not(feature = "sync"))]
mod inner {
pub trait MaybeSync {}
impl<T> MaybeSync for T where T: ?Sized {}
pub trait MaybeSend {}
impl<T> MaybeSend for T where T: ?Sized {}
pub use std::rc::Rc as MaybeArc;
}