summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2018-11-07 22:47:45 -0500
committerJesse Luehrs <doy@tozt.net>2018-11-07 22:47:45 -0500
commitde41e542cb74d192ffd48600569b7d9fdc9e6cdd (patch)
tree8a2df7c83ea3f886f77a17c785d090684e063451
parent82b4111b7be32b8cd0082a91224aafd53bc2677f (diff)
downloadlastfm-query-de41e542cb74d192ffd48600569b7d9fdc9e6cdd.tar.gz
lastfm-query-de41e542cb74d192ffd48600569b7d9fdc9e6cdd.zip
remove some unnecessary use statements
-rw-r--r--src/cli.rs3
-rw-r--r--src/cmd/sync.rs2
-rw-r--r--src/lastfm/mod.rs3
-rw-r--r--src/paths.rs6
4 files changed, 2 insertions, 12 deletions
diff --git a/src/cli.rs b/src/cli.rs
index 27b2742..d296fea 100644
--- a/src/cli.rs
+++ b/src/cli.rs
@@ -1,6 +1,3 @@
-use clap;
-use failure;
-
const _DUMMY_DEPENDENCY: &'static str = include_str!("../Cargo.toml");
pub enum Command {
diff --git a/src/cmd/sync.rs b/src/cmd/sync.rs
index 00fd35d..65b48b7 100644
--- a/src/cmd/sync.rs
+++ b/src/cmd/sync.rs
@@ -3,8 +3,6 @@ use db;
use lastfm;
use paths;
-use failure;
-
pub fn run(opts: &cli::Options) -> failure::Fallible<()> {
let db = db::DB::new(&paths::dbpath()?)?;
let lastfm = lastfm::LastFMClient::new(
diff --git a/src/lastfm/mod.rs b/src/lastfm/mod.rs
index 53e501e..fc2eb5b 100644
--- a/src/lastfm/mod.rs
+++ b/src/lastfm/mod.rs
@@ -1,6 +1,3 @@
-use failure;
-use reqwest;
-
mod api_types;
const API_ROOT: &'static str = "https://ws.audioscrobbler.com/2.0/";
diff --git a/src/paths.rs b/src/paths.rs
index b412045..a3f1eb8 100644
--- a/src/paths.rs
+++ b/src/paths.rs
@@ -1,7 +1,5 @@
-use directories::ProjectDirs;
-
-pub fn dbpath() -> failure::Fallible<std::path::PathBuf> {
- Ok(ProjectDirs::from("", "", "lastfm-query")
+pub fn db_path() -> failure::Fallible<std::path::PathBuf> {
+ Ok(directories::ProjectDirs::from("", "", "lastfm-query")
.ok_or_else(|| failure::err_msg("couldn't determine data directory"))?
.data_dir()
.join("tracks.sqlite"))