Fix indentation in a few places and remove unused imports

This commit is contained in:
Sebastian Dröge 2017-07-24 11:52:28 +03:00
parent e87c459099
commit ab4aa57a86
4 changed files with 11 additions and 7 deletions

View file

@ -266,7 +266,7 @@ mod tests {
("int", &12.to_value()),
("bool", &true.to_value()),
("string", &"bla".to_value()),
("fraction", &Fraction::new(1, 2).to_value()),
("fraction", &Fraction::new(1, 2).to_value())
//("array", vec![1.into(), 2.into()].into()),
],
).as_ref()

View file

@ -1,6 +1,6 @@
use glib;
use glib::IsA;
use glib::translate::{ToGlibPtr, from_glib};
use glib::translate::ToGlibPtr;
use ffi;
@ -11,7 +11,11 @@ pub trait GObjectExtManualGst {
impl<O: IsA<glib::Object>> GObjectExtManualGst for O {
fn set_property_from_str(&self, name: &str, value: &str) {
unsafe {
ffi::gst_util_set_object_arg(self.to_glib_none().0, name.to_glib_none().0, value.to_glib_none().0);
ffi::gst_util_set_object_arg(
self.to_glib_none().0,
name.to_glib_none().0,
value.to_glib_none().0,
);
}
}
}

View file

@ -412,7 +412,9 @@ pub struct Iter<'a> {
impl<'a> Iter<'a> {
pub fn new(structure: &'a StructureRef) -> Iter<'a> {
Iter { iter: FieldIterator::new(structure) }
Iter {
iter: FieldIterator::new(structure),
}
}
}

View file

@ -9,14 +9,12 @@
use num_rational::Rational32;
use std::fmt;
use std::ops;
use std::mem;
use glib;
use glib::value::{Value, FromValue, FromValueOptional, ToValue, SetValue, SetValueOptional};
use glib::value::{Value, FromValue, FromValueOptional, SetValue};
use glib::translate::{from_glib, ToGlibPtr, ToGlibPtrMut};
use ffi;
use gobject_ffi;
#[derive(Copy, Clone, Debug, Ord, PartialOrd, Eq, PartialEq, Hash)]
pub struct Fraction(pub Rational32);