Skip to content

Commit f94999d

Browse files
authored
Formatting
1 parent 9ebc919 commit f94999d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

library/alloc/src/slice.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,6 @@ pub use core::slice::{from_mut_ptr_range, from_ptr_range};
5252
pub use core::slice::{from_raw_parts, from_raw_parts_mut};
5353
#[unstable(feature = "slice_range", issue = "76393")]
5454
pub use core::slice::{range, try_range};
55-
#[cfg(kani)]
56-
use crate::kani;
5755

5856
////////////////////////////////////////////////////////////////////////////////
5957
// Basic slice extension methods
@@ -64,6 +62,8 @@ use crate::alloc::Global;
6462
#[cfg(not(no_global_oom_handling))]
6563
use crate::borrow::ToOwned;
6664
use crate::boxed::Box;
65+
#[cfg(kani)]
66+
use crate::kani;
6767
use crate::vec::Vec;
6868

6969
impl<T> [T] {
@@ -529,7 +529,7 @@ impl<T> [T] {
529529
#[cfg(kani)]
530530
let buf_ptr = ptr::slice_from_raw_parts(buf.as_ptr(), capacity);
531531
#[cfg(kani)]
532-
let len_ptr = unsafe {(&buf as *const Vec<T> as *const usize).add(2)};
532+
let len_ptr = unsafe { (&buf as *const Vec<T> as *const usize).add(2) };
533533
#[kani::loop_invariant(
534534
kani::mem::same_allocation(buf.as_ptr(), buf.as_ptr().wrapping_add(capacity)) &&
535535
unsafe {*len_ptr <= T::MAX_SLICE_LEN} &&

0 commit comments

Comments
 (0)