Fix some clippy warnings

This commit is contained in:
Sebastian Dröge 2017-02-03 15:57:36 +01:00
parent 7b5764e759
commit 9e59eff973
2 changed files with 5 additions and 5 deletions

View file

@ -210,6 +210,10 @@ impl StreamCollection {
unsafe { gst_stream_collection_get_size(self.0) }
}
pub fn empty(&self) -> bool {
self.len() == 0
}
pub fn get_upstream_id(&self) -> &str {
extern "C" {
fn gst_stream_collection_get_upstream_id(collection: *mut c_void) -> *mut c_char;

View file

@ -196,11 +196,7 @@ impl Value {
match gvalue.typ {
TYPE_BOOLEAN => unsafe {
Some(Value::Bool(if g_value_get_boolean(gvalue as *const GValue) == 0 {
false
} else {
true
}))
Some(Value::Bool(!(g_value_get_boolean(gvalue as *const GValue) == 0)))
},
TYPE_INT => unsafe { Some(Value::Int(g_value_get_int(gvalue as *const GValue))) },
TYPE_UINT => unsafe { Some(Value::UInt(g_value_get_uint(gvalue as *const GValue))) },