Use is_null()

This commit is contained in:
Benjamin Cheng 2018-06-02 13:49:42 -04:00
parent 5d8a44612d
commit b1c77a7ea5
No known key found for this signature in database
GPG Key ID: 4FE22E7528E97BD8
1 changed files with 1 additions and 1 deletions

View File

@ -74,7 +74,7 @@ where
.ssl_context() .ssl_context()
.ex_data(callback_idx) .ex_data(callback_idx)
.expect("BUG: psk callback missing") as *const F; .expect("BUG: psk callback missing") as *const F;
let hint = if hint != ptr::null() { let hint = if !hint.is_null() {
Some(CStr::from_ptr(hint).to_bytes()) Some(CStr::from_ptr(hint).to_bytes())
} else { } else {
None None