Skip to content

Commit

Permalink
allow undocumented direct access to .value and .interned so macros work
Browse files Browse the repository at this point in the history
  • Loading branch information
sam0x17 committed Aug 20, 2023
1 parent f4e4ddb commit 633db20
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,8 @@ impl BuildHasher for TypeIdHasherBuilder {
#[derive(Copy, Clone)]
pub struct Interned<T: Hash> {
_value: PhantomData<T>,
value: Static,
#[doc(hidden)]
pub value: Static,
}

impl<T: Hash> Interned<T> {
Expand Down
3 changes: 2 additions & 1 deletion src/memoized.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ use crate::*;
#[derive(Copy, Clone)]
pub struct Memoized<I: Hash, T: Hash + Staticize + DataType> {
_input: PhantomData<I>,
interned: Interned<T>,
#[doc(hidden)]
pub interned: Interned<T>,
}

impl<I: Hash, T: Hash + Staticize + DataType> Memoized<I, T> {
Expand Down

0 comments on commit 633db20

Please sign in to comment.