Skip to content

Commit 9ebc919

Browse files
authored
Formatting
1 parent 379fecf commit 9ebc919

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

library/alloc/src/slice.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,6 @@ pub use core::slice::{from_raw_parts, from_raw_parts_mut};
5454
pub use core::slice::{range, try_range};
5555
#[cfg(kani)]
5656
use crate::kani;
57-
#[cfg(kani)]
58-
use core::ptr::slice_from_raw_parts;
5957

6058
////////////////////////////////////////////////////////////////////////////////
6159
// Basic slice extension methods
@@ -529,9 +527,9 @@ impl<T> [T] {
529527
let mut m = n >> 1;
530528
// If `m > 0`, there are remaining bits up to the leftmost '1'.
531529
#[cfg(kani)]
532-
let buf_ptr= slice_from_raw_parts(buf.as_ptr(), capacity);
530+
let buf_ptr = ptr::slice_from_raw_parts(buf.as_ptr(), capacity);
533531
#[cfg(kani)]
534-
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)};
535533
#[kani::loop_invariant(
536534
kani::mem::same_allocation(buf.as_ptr(), buf.as_ptr().wrapping_add(capacity)) &&
537535
unsafe {*len_ptr <= T::MAX_SLICE_LEN} &&

0 commit comments

Comments
 (0)