blob: 96e037d4fcd7659201c655836c44982a3a523ac5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
// this file solely exists to test constants defined in foreign crates.
// As the most common case is the `http` crate, it replicates `http::HeaderName`'s structure.
#![allow(clippy::declare_interior_mutable_const)]
use std::sync::atomic::AtomicUsize;
enum Private<T> {
ToBeUnfrozen(T),
Frozen(usize),
}
pub struct Wrapper(Private<AtomicUsize>);
pub const WRAPPED_PRIVATE_UNFROZEN_VARIANT: Wrapper = Wrapper(Private::ToBeUnfrozen(AtomicUsize::new(6)));
pub const WRAPPED_PRIVATE_FROZEN_VARIANT: Wrapper = Wrapper(Private::Frozen(7));
|