Skip to content

Commit

Permalink
Guard unsafe impl example
Browse files Browse the repository at this point in the history
Signed-off-by: Tin Švagelj <[email protected]>
  • Loading branch information
Caellian committed Mar 22, 2024
1 parent d964574 commit 9bdfc4b
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,11 @@ use types::*;
/// ```
#[doc = include_str!("../examples/default_impl.rs")]
/// ```
///
/// ## Unsafe Implementation
/// ```
#[doc = include_str!("../examples/unsafe_impl.rs")]
/// ```
#[cfg_attr(feature = "unsafe_impl", doc = "")]
#[cfg_attr(feature = "unsafe_impl", doc = "## Unsafe Implementation")]
#[cfg_attr(feature = "unsafe_impl", doc = "```")]
#[cfg_attr(feature = "unsafe_impl", doc = include_str!("../examples/unsafe_impl.rs"))]
#[cfg_attr(feature = "unsafe_impl", doc = "```")]
pub struct ContiguousMemory<
Impl: ImplDetails<A> = ImplDefault,
A: ManageMemory = DefaultMemoryManager,
Expand Down Expand Up @@ -463,7 +463,7 @@ impl<Impl: ImplDetails<A>, A: ManageMemory> ContiguousMemory<Impl, A> {
/// use contiguous_mem::ContiguousMemory;
///
/// let mut s: ContiguousMemory = ContiguousMemory::new();
///
///
/// assert!(s.try_grow_to(1024).is_ok());
///
/// let required_size: usize = usize::MAX; // bad read?
Expand Down

0 comments on commit 9bdfc4b

Please sign in to comment.