src/is_blank.rs in faster_path-0.1.7 vs src/is_blank.rs in faster_path-0.1.8

- old
+ new

@@ -3,11 +3,12 @@ use std::str; #[no_mangle] pub extern fn is_blank(string: *const c_char) -> bool { let c_str = unsafe { - assert!(!string.is_null()); - + if string.is_null() { + return true; + } CStr::from_ptr(string) }; str::from_utf8(c_str.to_bytes()).unwrap().trim().is_empty() }