Skip to content

Commit 0486200

Browse files
committed
Fix invariant return
1 parent 021c59f commit 0486200

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

library/core/src/ffi/c_str.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ impl Invariant for &CStr {
224224
let bytes: &[c_char] = &self.inner;
225225
let len = bytes.len();
226226

227-
return !bytes.is_empty() && bytes[len - 1] == 0 && !bytes[..len-1].contains(&0);
227+
!bytes.is_empty() && bytes[len - 1] == 0 && !bytes[..len-1].contains(&0)
228228
}
229229
}
230230

0 commit comments

Comments
 (0)