Explorar o código

Fixed unused variable in memchr

Tom Almeida %!s(int64=7) %!d(string=hai) anos
pai
achega
87ec6dfacb
Modificáronse 1 ficheiros con 0 adicións e 1 borrados
  1. 0 1
      src/string/src/lib.rs

+ 0 - 1
src/string/src/lib.rs

@@ -39,7 +39,6 @@ pub unsafe extern "C" fn memccpy(
 pub unsafe extern "C" fn memchr(s: *const c_void, c: c_int, n: usize) -> *mut c_void {
     let s = s as *mut u8;
     let c = c as u8;
-    let mut i = 0;
     for i in 0..n {
         if *s.offset(i as isize) == c {
             return s.offset(i as isize) as *mut c_void;