summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Beyer <mail@beyermatthias.de>2019-04-13 19:20:57 +0200
committerMatthias Beyer <mail@beyermatthias.de>2019-04-13 22:06:53 +0200
commitde522ec0f2acc4e3651f77fdbe7f5295b6702c0d (patch)
treea78bde4883da98519f5b9d6013ab8587e22e6381
parent630090dd57df625e7d0f5b969584b920c491c99f (diff)
downloadimag-de522ec0f2acc4e3651f77fdbe7f5295b6702c0d.zip
imag-de522ec0f2acc4e3651f77fdbe7f5295b6702c0d.tar.gz
Fix for rust beta compiler
The beta compiler reports duplicated input: error: the item `IntoValues` is imported redundantly --> lib/entry/libimagentrylink/src/internal.rs:398:13 | 36 | use self::iter::IntoValues; | ---------------------- the item `IntoValues` is already imported here ... 398 | use internal::iter::IntoValues; | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | so we fix this here. Other imports were fixed as well. Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
-rw-r--r--bin/core/imag-link/src/main.rs2
-rw-r--r--lib/core/libimagrt/src/configuration.rs1
-rw-r--r--lib/core/libimagrt/src/lib.rs2
-rw-r--r--lib/core/libimagrt/src/runtime.rs5
-rw-r--r--lib/entry/libimagentrylink/src/external.rs1
-rw-r--r--lib/entry/libimagentrylink/src/internal.rs2
6 files changed, 0 insertions, 13 deletions
diff --git a/bin/core/imag-link/src/main.rs b/bin/core/imag-link/src/main.rs
index cfd2c4f..fedda18 100644
--- a/bin/core/imag-link/src/main.rs
+++ b/bin/core/imag-link/src/main.rs
@@ -129,8 +129,6 @@ fn main() {
}
fn get_entry_by_name<'a>(rt: &'a Runtime, name: &str) -> Result<Option<FileLockEntry<'a>>> {
- use libimagstore::storeid::StoreId;
-
debug!("Getting: {:?}", name);
let result = StoreId::new(PathBuf::from(name)).and_then(|id| rt.store().get(id));
diff --git a/lib/core/libimagrt/src/configuration.rs b/lib/core/libimagrt/src/configuration.rs
index 286cad0..20f1a22 100644
--- a/lib/core/libimagrt/src/configuration.rs
+++ b/lib/core/libimagrt/src/configuration.rs
@@ -40,7 +40,6 @@ pub fn fetch_config(searchpath: &PathBuf) -> Result<Option<Value>> {
use std::io::Write;
use std::io::stderr;
- use xdg_basedir;
use itertools::Itertools;
use libimagutil::variants::generate_variants as gen_vars;
diff --git a/lib/core/libimagrt/src/lib.rs b/lib/core/libimagrt/src/lib.rs
index 65e3e03..825b49e 100644
--- a/lib/core/libimagrt/src/lib.rs
+++ b/lib/core/libimagrt/src/lib.rs
@@ -39,8 +39,6 @@
#[macro_use] extern crate log;
extern crate itertools;
-#[cfg(unix)] extern crate xdg_basedir;
-extern crate env_logger;
extern crate ansi_term;
extern crate handlebars;
#[macro_use] extern crate failure;
diff --git a/lib/core/libimagrt/src/runtime.rs b/lib/core/libimagrt/src/runtime.rs
index fdbc1b8..6eadc12 100644
--- a/lib/core/libimagrt/src/runtime.rs
+++ b/lib/core/libimagrt/src/runtime.rs
@@ -77,8 +77,6 @@ impl<'a> Runtime<'a> {
pub fn new<C>(cli_app: C) -> Result<Runtime<'a>>
where C: Clone + CliSpec<'a> + InternalConfiguration
{
- use libimagerror::trace::trace_error;
-
let matches = cli_app.clone().matches();
let rtp = get_rtp_match(&matches);
@@ -354,7 +352,6 @@ impl<'a> Runtime<'a> {
use log::set_max_level;
use log::set_boxed_logger;
use std::env::var as env_var;
- use env_logger;
if env_var("IMAG_LOG_ENV").is_ok() {
let _ = env_logger::try_init();
@@ -643,8 +640,6 @@ pub trait IdPathProvider {
/// Exported for the `imag` command, you probably do not want to use that.
pub fn get_rtp_match<'a>(matches: &ArgMatches<'a>) -> PathBuf {
- use std::env;
-
matches.value_of(Runtime::arg_runtimepath_name())
.map_or_else(|| {
if let Ok(home) = env::var("IMAG_RTP") {
diff --git a/lib/entry/libimagentrylink/src/external.rs b/lib/entry/libimagentrylink/src/external.rs
index 5d7084e..bfce70a 100644
--- a/lib/entry/libimagentrylink/src/external.rs
+++ b/lib/entry/libimagentrylink/src/external.rs
@@ -452,7 +452,6 @@ mod tests {
use libimagstore::store::Store;
fn setup_logging() {
- use env_logger;
let _ = env_logger::try_init();
}
diff --git a/lib/entry/libimagentrylink/src/internal.rs b/lib/entry/libimagentrylink/src/internal.rs
index d9c13dd..89f4455 100644
--- a/lib/entry/libimagentrylink/src/internal.rs
+++ b/lib/entry/libimagentrylink/src/internal.rs
@@ -395,8 +395,6 @@ impl InternalLinker for Entry {
/// Set the links in a header and return the old links, if any.
fn set_internal_links(&mut self, links: Vec<&mut Entry>) -> Result<LinkIter> {
- use internal::iter::IntoValues;
-
debug!("Setting internal links");
let self_location = self.get_location().clone();