*: use is_null instead of == ptr::null()

This commit is contained in:
meh
2015-06-08 15:48:28 +02:00
parent ff1b880be6
commit d56ac34413
7 changed files with 23 additions and 25 deletions

View File

@ -13,7 +13,7 @@ impl Iterator for AudioIter {
unsafe {
let ptr = av_output_audio_device_next(self.0);
if ptr == ptr::null_mut() && self.0 != ptr::null_mut() {
if ptr.is_null() && !self.0.is_null() {
None
}
else {
@ -36,7 +36,7 @@ impl Iterator for VideoIter {
unsafe {
let ptr = av_output_video_device_next(self.0);
if ptr == ptr::null_mut() && self.0 != ptr::null_mut() {
if ptr.is_null() && !self.0.is_null() {
None
}
else {