Skip to content

Commit

Permalink
unnecessary closure
Browse files Browse the repository at this point in the history
  • Loading branch information
Matias Scharager committed Jul 8, 2024
1 parent f28023d commit 1e336d3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions library/kani/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ pub fn havoc<T: ?Sized>(_pointer: &T) {
#[rustc_diagnostic_item = "KaniHavocSlice"]
#[inline(always)]
pub fn havoc_slice<T: Arbitrary>(slice: &mut [T]) {
slice.fill_with(|| T::any())
slice.fill_with(T::any)
}

#[rustc_diagnostic_item = "KaniHavocSlim"]
Expand All @@ -212,7 +212,7 @@ pub fn havoc_slim<T: Arbitrary>(pointer: &mut T) {
#[rustc_diagnostic_item = "KaniHavocStr"]
#[inline(always)]
pub fn havoc_str(s: &mut str) {
unsafe { s.as_bytes_mut() }.fill_with(|| u8::any())
unsafe { s.as_bytes_mut() }.fill_with(u8::any)
//TODO: String validation
}

Expand Down

0 comments on commit 1e336d3

Please sign in to comment.