mirror of
https://github.com/denoland/deno.git
synced 2024-11-27 16:10:57 -05:00
5faf769ac6
This is slow progress towards creating a `deno_resolver` crate. Waiting on: * https://github.com/denoland/deno/pull/25918 * https://github.com/denoland/deno/pull/25916
23 lines
519 B
Rust
23 lines
519 B
Rust
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
|
|
|
pub use inner::*;
|
|
|
|
#[cfg(feature = "sync")]
|
|
mod inner {
|
|
#![allow(clippy::disallowed_types)]
|
|
|
|
pub use std::sync::Arc as MaybeArc;
|
|
|
|
pub use core::marker::Send as MaybeSend;
|
|
pub use core::marker::Sync as MaybeSync;
|
|
}
|
|
|
|
#[cfg(not(feature = "sync"))]
|
|
mod inner {
|
|
pub use std::rc::Rc as MaybeArc;
|
|
|
|
pub trait MaybeSync {}
|
|
impl<T> MaybeSync for T where T: ?Sized {}
|
|
pub trait MaybeSend {}
|
|
impl<T> MaybeSend for T where T: ?Sized {}
|
|
}
|