Skip to content

Commit

Permalink
chore: move doc comment
Browse files Browse the repository at this point in the history
  • Loading branch information
indietyp committed Mar 28, 2023
1 parent da66e36 commit 1e377a1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions libs/deer/src/impls/core/array.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@ impl<'de, T: Deserialize<'de>, const N: usize> Visitor<'de> for ArrayVisitor<'de

let mut result: Result<(), ArrayAccessError> = Ok(());

// uninit_assumed_init is fine here, as `[MaybeUninit<T>; N]` as no inhabitants,
// the code shown here is also present in 1) the rust docs and 2) as an OK example in the
// clippy docs
#[allow(unsafe_code)]
#[allow(clippy::uninit_assumed_init)]
// SAFETY: this is the same as `MaybeUninit::uninit_array()`, which is still unstable
// SAFETY: `uninit_assumed_init` is fine here, as `[MaybeUninit<T>; N]` as no inhabitants,
// the code shown here is also present in 1) the rust docs and 2) as an OK example in the
// clippy docs. The code is the same as in `MaybeUninit::uninit_array()`, which is still
// unstable
let mut array: [MaybeUninit<T>; N] = unsafe { MaybeUninit::uninit().assume_init() };

let mut index = 0;
Expand Down

0 comments on commit 1e377a1

Please sign in to comment.