Skip to content

Commit

Permalink
docs: remove unused NonNull imports
Browse files Browse the repository at this point in the history
Signed-off-by: Martin Kröning <[email protected]>
  • Loading branch information
mkroening committed Apr 20, 2024
1 parent 2252916 commit 4e2dbf3
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 12 deletions.
2 changes: 0 additions & 2 deletions src/volatile_ptr/macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
///
/// ```
/// use volatile::{VolatilePtr, map_field};
/// use core::ptr::NonNull;
///
/// struct Example { field_1: u32, field_2: u8, }
/// let mut value = Example { field_1: 15, field_2: 255 };
Expand All @@ -20,7 +19,6 @@
/// Creating `VolatilePtr`s to unaligned field in packed structs is not allowed:
/// ```compile_fail
/// use volatile::{VolatilePtr, map_field};
/// use core::ptr::NonNull;
///
/// #[repr(packed)]
/// struct Example { field_1: u8, field_2: usize, }
Expand Down
6 changes: 0 additions & 6 deletions src/volatile_ptr/operations.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,6 @@ where
///
/// ```rust
/// use volatile::VolatilePtr;
/// use core::ptr::NonNull;
///
/// let mut value = 42;
/// let mut volatile = unsafe { VolatilePtr::new((&mut value).into()) };
Expand All @@ -124,7 +123,6 @@ where
///
/// ```rust
/// use volatile::VolatilePtr;
/// use core::ptr::NonNull;
///
/// let mut value = 42;
/// let mut volatile = unsafe { VolatilePtr::new((&mut value).into()) };
Expand All @@ -148,7 +146,6 @@ where
///
/// ```
/// use volatile::VolatilePtr;
/// use core::ptr::NonNull;
///
/// let mut value = 42;
/// let mut volatile = unsafe { VolatilePtr::new((&mut value).into()) };
Expand Down Expand Up @@ -188,7 +185,6 @@ where
///
/// ```
/// use volatile::VolatilePtr;
/// use core::ptr::NonNull;
///
/// let mut value = 5;
/// let mut volatile = unsafe { VolatilePtr::new((&mut value).into()) };
Expand Down Expand Up @@ -225,7 +221,6 @@ where
///
/// ```
/// use volatile::VolatilePtr;
/// use core::ptr::NonNull;
///
/// let mut value: i16 = -4;
/// let mut volatile = unsafe { VolatilePtr::new((&mut value).into()) };
Expand All @@ -246,7 +241,6 @@ where
///
/// ```
/// use volatile::{VolatilePtr, map_field};
/// use core::ptr::NonNull;
///
/// struct Example { field_1: u32, field_2: u8, }
/// let mut value = Example { field_1: 15, field_2: 255 };
Expand Down
2 changes: 0 additions & 2 deletions src/volatile_ptr/unstable.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ impl<'a, T, A> VolatilePtr<'a, [T], A> {
///
/// ```
/// use volatile::VolatilePtr;
/// use core::ptr::NonNull;
///
/// let array = [1, 2, 3];
/// let slice = &array[..];
Expand All @@ -47,7 +46,6 @@ impl<'a, T, A> VolatilePtr<'a, [T], A> {
///
/// ```
/// use volatile::VolatilePtr;
/// use core::ptr::NonNull;
///
/// let array = [1, 2, 3];
/// let slice = &array[..];
Expand Down
2 changes: 0 additions & 2 deletions src/volatile_ref.rs
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,6 @@ where
///
/// ```
/// use volatile::VolatileRef;
/// use core::ptr::NonNull;
///
/// let mut value: i16 = -4;
/// let mut volatile = VolatileRef::from_mut_ref(&mut value);
Expand All @@ -201,7 +200,6 @@ where
///
/// ```
/// use volatile::{VolatileRef};
/// use core::ptr::NonNull;
///
/// #[derive(Clone, Copy)]
/// struct Example { field_1: u32, field_2: u8, }
Expand Down

0 comments on commit 4e2dbf3

Please sign in to comment.