From 10b130379aed6a7e7247545c39703903c0d04c8f Mon Sep 17 00:00:00 2001 From: Markus Reiter Date: Mon, 29 Jun 2020 06:41:41 +0200 Subject: [PATCH] Fix more warnings. --- src/app.rs | 1 - src/file_assoc.rs | 1 - src/manifest.rs | 3 +-- src/templates.rs | 2 -- src/util.rs | 1 - 5 files changed, 1 insertion(+), 7 deletions(-) diff --git a/src/app.rs b/src/app.rs index 590f229c..80e90478 100644 --- a/src/app.rs +++ b/src/app.rs @@ -2,7 +2,6 @@ use std::env; use std::path::PathBuf; use clap::{App, AppSettings, Arg, ArgGroup, ArgMatches, SubCommand}; -use dirs; use crate::templates; diff --git a/src/file_assoc.rs b/src/file_assoc.rs index baeadb21..1f2d4cf2 100644 --- a/src/file_assoc.rs +++ b/src/file_assoc.rs @@ -3,7 +3,6 @@ use std::io; -use clap; use itertools::Itertools; use winreg::{enums as wre, RegKey}; diff --git a/src/manifest.rs b/src/manifest.rs index 4462493f..b26cbe0d 100644 --- a/src/manifest.rs +++ b/src/manifest.rs @@ -6,7 +6,6 @@ use std::path::Path; use pulldown_cmark::{CodeBlockKind, Event, Options, Parser, Tag}; use regex::Regex; -use toml; use crate::error::{Blame, Result}; use crate::templates; @@ -819,7 +818,7 @@ fn extract_comment(s: &str) -> Result { // Update nesting and look for end-of-comment. let mut end_of_comment = None; - for (end, marker) in { nesting_re.find_iter(line).map(|m| (m.start(), m.as_str())) } { + for (end, marker) in nesting_re.find_iter(line).map(|m| (m.start(), m.as_str())) { match (marker, depth) { ("/*", _) => depth += 1, ("*/", 1) => { diff --git a/src/templates.rs b/src/templates.rs index ccc52594..af3b7fdf 100644 --- a/src/templates.rs +++ b/src/templates.rs @@ -3,8 +3,6 @@ This module contains code related to template support. */ use crate::app; use crate::error::{Blame, MainError, Result, ResultExt}; -use clap; -use open; use regex::Regex; use std::borrow::Cow; use std::collections::HashMap; diff --git a/src/util.rs b/src/util.rs index 51163c5d..e933afb8 100644 --- a/src/util.rs +++ b/src/util.rs @@ -58,7 +58,6 @@ pub use self::suppress_child_output::{suppress_child_output, ChildToken}; #[cfg(feature = "suppress-cargo-output")] mod suppress_child_output { use crate::error::Result; - use chan; use std::io; use std::process::{self, Command}; use std::thread;