Skip to content

Commit

Permalink
Replace value == ptr::null() with value.is_null()
Browse files Browse the repository at this point in the history
  • Loading branch information
erickt committed Aug 29, 2016
1 parent 2ec48bb commit de4292f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1033,7 +1033,7 @@ impl Message {
zmq_sys::zmq_msg_gets(&mut self.msg, c_str.as_ptr())
};

if value == ptr::null() {
if value.is_null() {
None
} else {
Some(unsafe { str::from_utf8(ffi::CStr::from_ptr(value).to_bytes()).unwrap() })
Expand Down

0 comments on commit de4292f

Please sign in to comment.