*: use is_null instead of == ptr::null()
This commit is contained in:
@ -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 {
|
||||
|
Reference in New Issue
Block a user