lib: fix new clippy warnings
This fixes the following warnings highlighted by clippy: * https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark * https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure * https://rust-lang.github.io/rust-clippy/master/index.html#single_component_path_imports
This commit is contained in:
parent
86295e3bfe
commit
810e86d4fb
|
|
@ -1,7 +1,5 @@
|
||||||
use ffi::OstreeKernelArgs;
|
use ffi::OstreeKernelArgs;
|
||||||
#[cfg(any(feature = "v2019_3", feature = "dox"))]
|
#[cfg(any(feature = "v2019_3", feature = "dox"))]
|
||||||
use gio;
|
|
||||||
#[cfg(any(feature = "v2019_3", feature = "dox"))]
|
|
||||||
use glib::object::IsA;
|
use glib::object::IsA;
|
||||||
use glib::translate::*;
|
use glib::translate::*;
|
||||||
#[cfg(any(feature = "v2019_3", feature = "dox"))]
|
#[cfg(any(feature = "v2019_3", feature = "dox"))]
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,3 @@
|
||||||
use glib;
|
|
||||||
use std::fmt::Display;
|
use std::fmt::Display;
|
||||||
use std::fmt::Formatter;
|
use std::fmt::Formatter;
|
||||||
use std::fmt::Error;
|
use std::fmt::Error;
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
use crate::ObjectType;
|
use crate::ObjectType;
|
||||||
use crate::{object_name_deserialize, object_name_serialize, object_to_string};
|
use crate::{object_name_deserialize, object_name_serialize, object_to_string};
|
||||||
use glib;
|
|
||||||
use glib::translate::*;
|
use glib::translate::*;
|
||||||
use glib::GString;
|
use glib::GString;
|
||||||
use std::fmt::Display;
|
use std::fmt::Display;
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
#[cfg(any(feature = "v2016_4", feature = "dox"))]
|
#[cfg(any(feature = "v2016_4", feature = "dox"))]
|
||||||
use crate::RepoListRefsExtFlags;
|
use crate::RepoListRefsExtFlags;
|
||||||
use crate::{Checksum, ObjectName, ObjectDetails, ObjectType, Repo, RepoTransactionStats};
|
use crate::{Checksum, ObjectName, ObjectDetails, ObjectType, Repo, RepoTransactionStats};
|
||||||
use ffi;
|
|
||||||
use ffi::OstreeRepoListObjectsFlags;
|
use ffi::OstreeRepoListObjectsFlags;
|
||||||
use glib::ffi as glib_sys;
|
use glib::ffi as glib_sys;
|
||||||
use glib::{self, translate::*, Error, IsA};
|
use glib::{self, translate::*, Error, IsA};
|
||||||
|
|
@ -117,7 +116,7 @@ impl Repo {
|
||||||
let copy = dfd.try_clone();
|
let copy = dfd.try_clone();
|
||||||
// Now release our temporary ownership of the original
|
// Now release our temporary ownership of the original
|
||||||
let _ = dfd.into_raw_fd();
|
let _ = dfd.into_raw_fd();
|
||||||
Ok(copy?)
|
copy
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -49,7 +49,7 @@ impl SysrootBuilder {
|
||||||
/// Perform common configuration steps, returning a not-yet-fully-loaded `Sysroot`.
|
/// Perform common configuration steps, returning a not-yet-fully-loaded `Sysroot`.
|
||||||
fn configure_common(self) -> Sysroot {
|
fn configure_common(self) -> Sysroot {
|
||||||
let sysroot = {
|
let sysroot = {
|
||||||
let opt_file = self.path.map(|p| gio::File::for_path(p));
|
let opt_file = self.path.map(gio::File::for_path);
|
||||||
Sysroot::new(opt_file.as_ref())
|
Sysroot::new(opt_file.as_ref())
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue