@@ -199,9 +199,7 @@ impl Program {
199199 let bytes_len = mem:: size_of_val ( slice) ;
200200
201201 // Transmuting types is safe as long a sizes match.
202- let bytes = unsafe {
203- std:: slice:: from_raw_parts ( slice. as_ptr ( ) as * const u8 , bytes_len)
204- } ;
202+ let bytes = unsafe { std:: slice:: from_raw_parts ( slice. as_ptr ( ) as * const u8 , bytes_len) } ;
205203
206204 // It is only unsafe as long as the buffer isn't initialized, but that's what we do next.
207205 let mut buffer = unsafe { DeviceBuffer :: < u8 > :: uninitialized ( bytes_len) ? } ;
@@ -241,10 +239,7 @@ impl Program {
241239
242240 // Transmuting types is safe as long a sizes match.
243241 let bytes = unsafe {
244- std:: slice:: from_raw_parts (
245- data. as_ptr ( ) as * const u8 ,
246- mem:: size_of_val ( data) ,
247- )
242+ std:: slice:: from_raw_parts ( data. as_ptr ( ) as * const u8 , mem:: size_of_val ( data) )
248243 } ;
249244
250245 // It is safe as we synchronize the stream after the call.
@@ -260,10 +255,7 @@ impl Program {
260255
261256 // Transmuting types is safe as long a sizes match.
262257 let bytes = unsafe {
263- std:: slice:: from_raw_parts_mut (
264- data. as_mut_ptr ( ) as * mut u8 ,
265- mem:: size_of_val ( data) ,
266- )
258+ std:: slice:: from_raw_parts_mut ( data. as_mut_ptr ( ) as * mut u8 , mem:: size_of_val ( data) )
267259 } ;
268260
269261 // It is safe as we synchronize the stream after the call.
0 commit comments