diff --git a/Cargo.toml b/Cargo.toml index eefc682..07d077c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -21,6 +21,7 @@ categories = [ exclude = [ "res/*", ] +edition = "2018" [package.metadata.deb] section = "utility" diff --git a/README.md b/README.md index bd86c4f..adf5e73 100644 --- a/README.md +++ b/README.md @@ -146,7 +146,7 @@ all available subcommands. Because `ffsend` is still in alpha, only limited installation options are available right now. -### Arch AUR package +#### Arch AUR package [ยป `ffsend` on `aur.archlinux.org`][aur-ffsend] ```bash diff --git a/src/action/debug.rs b/src/action/debug.rs index 49f88e5..73b07fa 100644 --- a/src/action/debug.rs +++ b/src/action/debug.rs @@ -3,10 +3,10 @@ use clap::ArgMatches; use ffsend_api::config::SEND_DEFAULT_EXPIRE_TIME; use prettytable::{format::FormatBuilder, Cell, Row, Table}; -use client::to_duration; -use cmd::matcher::{debug::DebugMatcher, main::MainMatcher, Matcher}; -use error::ActionError; -use util::{features_list, format_bool, format_duration}; +use crate::client::to_duration; +use crate::cmd::matcher::{debug::DebugMatcher, main::MainMatcher, Matcher}; +use crate::error::ActionError; +use crate::util::{features_list, format_bool, format_duration}; /// A file debug action. pub struct Debug<'a> { diff --git a/src/action/delete.rs b/src/action/delete.rs index 1102d1d..226a767 100644 --- a/src/action/delete.rs +++ b/src/action/delete.rs @@ -2,12 +2,12 @@ use clap::ArgMatches; use ffsend_api::action::delete::{Delete as ApiDelete, Error as DeleteError}; use ffsend_api::file::remote_file::{FileParseError, RemoteFile}; -use client::create_client; -use cmd::matcher::{delete::DeleteMatcher, main::MainMatcher, Matcher}; -use error::ActionError; +use crate::client::create_client; +use crate::cmd::matcher::{delete::DeleteMatcher, main::MainMatcher, Matcher}; +use crate::error::ActionError; #[cfg(feature = "history")] -use history_tool; -use util::{ensure_owner_token, print_success}; +use crate::history_tool; +use crate::util::{ensure_owner_token, print_success}; /// A file delete action. pub struct Delete<'a> { diff --git a/src/action/download.rs b/src/action/download.rs index b3f7391..90c7200 100644 --- a/src/action/download.rs +++ b/src/action/download.rs @@ -16,13 +16,13 @@ use ffsend_api::reader::ProgressReporter; use tempfile::{Builder as TempBuilder, NamedTempFile}; #[cfg(feature = "archive")] -use archive::archive::Archive; -use client::create_transfer_client; -use cmd::matcher::{download::DownloadMatcher, main::MainMatcher, Matcher}; +use crate::archive::archive::Archive; +use crate::client::create_transfer_client; +use crate::cmd::matcher::{download::DownloadMatcher, main::MainMatcher, Matcher}; #[cfg(feature = "history")] -use history_tool; -use progress::ProgressBar; -use util::{ +use crate::history_tool; +use crate::progress::ProgressBar; +use crate::util::{ ensure_enough_space, ensure_password, prompt_yes, quit, quit_error, quit_error_msg, ErrorHints, }; diff --git a/src/action/exists.rs b/src/action/exists.rs index bb39b95..7748750 100644 --- a/src/action/exists.rs +++ b/src/action/exists.rs @@ -2,12 +2,12 @@ use clap::ArgMatches; use ffsend_api::action::exists::{Error as ExistsError, Exists as ApiExists}; use ffsend_api::file::remote_file::{FileParseError, RemoteFile}; -use client::create_client; -use cmd::matcher::main::MainMatcher; -use cmd::matcher::{exists::ExistsMatcher, Matcher}; -use error::ActionError; +use crate::client::create_client; +use crate::cmd::matcher::main::MainMatcher; +use crate::cmd::matcher::{exists::ExistsMatcher, Matcher}; +use crate::error::ActionError; #[cfg(feature = "history")] -use history_tool; +use crate::history_tool; /// A file exists action. pub struct Exists<'a> { diff --git a/src/action/history.rs b/src/action/history.rs index d181212..2b12793 100644 --- a/src/action/history.rs +++ b/src/action/history.rs @@ -1,10 +1,10 @@ use clap::ArgMatches; use prettytable::{format::FormatBuilder, Cell, Row, Table}; -use cmd::matcher::{main::MainMatcher, Matcher}; -use error::ActionError; -use history::{History as HistoryManager, LoadError as HistoryLoadError}; -use util::format_duration; +use crate::cmd::matcher::{main::MainMatcher, Matcher}; +use crate::error::ActionError; +use crate::history::{History as HistoryManager, LoadError as HistoryLoadError}; +use crate::util::format_duration; /// A history action. pub struct History<'a> { diff --git a/src/action/info.rs b/src/action/info.rs index b06f5e0..5254b5d 100644 --- a/src/action/info.rs +++ b/src/action/info.rs @@ -7,11 +7,13 @@ use ffsend_api::action::metadata::Metadata as ApiMetadata; use ffsend_api::file::remote_file::{FileParseError, RemoteFile}; use prettytable::{format::FormatBuilder, Cell, Row, Table}; -use client::create_client; -use cmd::matcher::{info::InfoMatcher, main::MainMatcher, Matcher}; +use crate::client::create_client; +use crate::cmd::matcher::{info::InfoMatcher, main::MainMatcher, Matcher}; #[cfg(feature = "history")] -use history_tool; -use util::{ensure_owner_token, ensure_password, format_bytes, format_duration, print_error}; +use crate::history_tool; +use crate::util::{ + ensure_owner_token, ensure_password, format_bytes, format_duration, print_error, +}; /// A file info action. pub struct Info<'a> { diff --git a/src/action/params.rs b/src/action/params.rs index 621b2c7..6dd493a 100644 --- a/src/action/params.rs +++ b/src/action/params.rs @@ -2,12 +2,12 @@ use clap::ArgMatches; use ffsend_api::action::params::{Error as ParamsError, Params as ApiParams, ParamsDataBuilder}; use ffsend_api::file::remote_file::RemoteFile; -use client::create_client; -use cmd::matcher::{main::MainMatcher, params::ParamsMatcher, Matcher}; -use error::ActionError; +use crate::client::create_client; +use crate::cmd::matcher::{main::MainMatcher, params::ParamsMatcher, Matcher}; +use crate::error::ActionError; #[cfg(feature = "history")] -use history_tool; -use util::{ensure_owner_token, print_success}; +use crate::history_tool; +use crate::util::{ensure_owner_token, print_success}; /// A file parameters action. pub struct Params<'a> { diff --git a/src/action/password.rs b/src/action/password.rs index 2db2d23..bd6da53 100644 --- a/src/action/password.rs +++ b/src/action/password.rs @@ -3,12 +3,12 @@ use ffsend_api::action::password::{Error as PasswordError, Password as ApiPasswo use ffsend_api::file::remote_file::RemoteFile; use prettytable::{format::FormatBuilder, Cell, Row, Table}; -use client::create_client; -use cmd::matcher::{main::MainMatcher, password::PasswordMatcher, Matcher}; -use error::ActionError; +use crate::client::create_client; +use crate::cmd::matcher::{main::MainMatcher, password::PasswordMatcher, Matcher}; +use crate::error::ActionError; #[cfg(feature = "history")] -use history_tool; -use util::{ensure_owner_token, print_success}; +use crate::history_tool; +use crate::util::{ensure_owner_token, print_success}; /// A file password action. pub struct Password<'a> { diff --git a/src/action/upload.rs b/src/action/upload.rs index b59e76d..969c8dc 100644 --- a/src/action/upload.rs +++ b/src/action/upload.rs @@ -15,15 +15,15 @@ use prettytable::{format::FormatBuilder, Cell, Row, Table}; use tempfile::{Builder as TempBuilder, NamedTempFile}; #[cfg(feature = "archive")] -use archive::archiver::Archiver; -use client::create_transfer_client; -use cmd::matcher::{MainMatcher, Matcher, UploadMatcher}; +use crate::archive::archiver::Archiver; +use crate::client::create_transfer_client; +use crate::cmd::matcher::{MainMatcher, Matcher, UploadMatcher}; #[cfg(feature = "history")] -use history_tool; -use progress::ProgressBar; +use crate::history_tool; +use crate::progress::ProgressBar; #[cfg(feature = "clipboard")] -use util::set_clipboard; -use util::{ +use crate::util::set_clipboard; +use crate::util::{ format_bytes, open_url, print_error, print_error_msg, prompt_yes, quit, quit_error_msg, ErrorHintsBuilder, }; diff --git a/src/client.rs b/src/client.rs index 10432a6..a8556ca 100644 --- a/src/client.rs +++ b/src/client.rs @@ -2,7 +2,7 @@ use std::time::Duration; use ffsend_api::reqwest::{Client, ClientBuilder}; -use cmd::matcher::MainMatcher; +use crate::cmd::matcher::MainMatcher; /// Create the default client, which is used for generic Send requests. /// diff --git a/src/cmd/arg/download_limit.rs b/src/cmd/arg/download_limit.rs index 544ad16..912a4d3 100644 --- a/src/cmd/arg/download_limit.rs +++ b/src/cmd/arg/download_limit.rs @@ -5,7 +5,7 @@ use ffsend_api::action::params::{ use super::{CmdArg, CmdArgFlag, CmdArgOption}; -use util::{quit_error_msg, ErrorHintsBuilder}; +use crate::util::{quit_error_msg, ErrorHintsBuilder}; /// The download limit argument. pub struct ArgDownloadLimit {} diff --git a/src/cmd/arg/host.rs b/src/cmd/arg/host.rs index da7e1f2..810f6d1 100644 --- a/src/cmd/arg/host.rs +++ b/src/cmd/arg/host.rs @@ -4,8 +4,8 @@ use ffsend_api::config::SEND_DEFAULT_HOST; use ffsend_api::url::Url; use super::{CmdArg, CmdArgOption}; -use host::parse_host; -use util::{quit_error, ErrorHints}; +use crate::host::parse_host; +use crate::util::{quit_error, ErrorHints}; /// The host argument. pub struct ArgHost {} diff --git a/src/cmd/arg/owner.rs b/src/cmd/arg/owner.rs index 3850695..95d6ec7 100644 --- a/src/cmd/arg/owner.rs +++ b/src/cmd/arg/owner.rs @@ -1,8 +1,8 @@ use clap::{Arg, ArgMatches}; use super::{CmdArg, CmdArgFlag, CmdArgOption}; -use cmd::matcher::{MainMatcher, Matcher}; -use util::prompt_owner_token; +use crate::cmd::matcher::{MainMatcher, Matcher}; +use crate::util::prompt_owner_token; /// The owner argument. pub struct ArgOwner {} diff --git a/src/cmd/arg/password.rs b/src/cmd/arg/password.rs index 8954815..aa77404 100644 --- a/src/cmd/arg/password.rs +++ b/src/cmd/arg/password.rs @@ -1,8 +1,8 @@ use clap::{Arg, ArgMatches}; use super::{CmdArg, CmdArgFlag, CmdArgOption}; -use cmd::matcher::{MainMatcher, Matcher}; -use util::{check_empty_password, prompt_password}; +use crate::cmd::matcher::{MainMatcher, Matcher}; +use crate::util::{check_empty_password, prompt_password}; /// The password argument. pub struct ArgPassword {} diff --git a/src/cmd/arg/url.rs b/src/cmd/arg/url.rs index 973c0c5..3783676 100644 --- a/src/cmd/arg/url.rs +++ b/src/cmd/arg/url.rs @@ -3,8 +3,8 @@ use failure::Fail; use ffsend_api::url::Url; use super::{CmdArg, CmdArgOption}; -use host::parse_host; -use util::{quit_error, ErrorHints}; +use crate::host::parse_host; +use crate::util::{quit_error, ErrorHints}; /// The URL argument. pub struct ArgUrl {} diff --git a/src/cmd/handler.rs b/src/cmd/handler.rs index b1d837b..0a00d18 100644 --- a/src/cmd/handler.rs +++ b/src/cmd/handler.rs @@ -13,9 +13,9 @@ use super::subcmd::CmdHistory; use super::subcmd::{ CmdDebug, CmdDelete, CmdDownload, CmdExists, CmdInfo, CmdParams, CmdPassword, CmdUpload, }; -use config::{CLIENT_TIMEOUT, CLIENT_TRANSFER_TIMEOUT}; +use crate::config::{CLIENT_TIMEOUT, CLIENT_TRANSFER_TIMEOUT}; #[cfg(feature = "history")] -use util::app_history_file_path_string; +use crate::util::app_history_file_path_string; #[cfg(feature = "history")] lazy_static! { diff --git a/src/cmd/matcher/debug.rs b/src/cmd/matcher/debug.rs index 8adfe77..66f3059 100644 --- a/src/cmd/matcher/debug.rs +++ b/src/cmd/matcher/debug.rs @@ -2,7 +2,7 @@ use clap::ArgMatches; use ffsend_api::url::Url; use super::Matcher; -use cmd::arg::{ArgHost, CmdArgOption}; +use crate::cmd::arg::{ArgHost, CmdArgOption}; /// The debug command matcher. pub struct DebugMatcher<'a> { diff --git a/src/cmd/matcher/delete.rs b/src/cmd/matcher/delete.rs index 992fd8a..5379282 100644 --- a/src/cmd/matcher/delete.rs +++ b/src/cmd/matcher/delete.rs @@ -2,7 +2,7 @@ use clap::ArgMatches; use ffsend_api::url::Url; use super::Matcher; -use cmd::arg::{ArgOwner, ArgUrl, CmdArgOption}; +use crate::cmd::arg::{ArgOwner, ArgUrl, CmdArgOption}; /// The delete command matcher. pub struct DeleteMatcher<'a> { diff --git a/src/cmd/matcher/download.rs b/src/cmd/matcher/download.rs index 67653b1..f77dfb5 100644 --- a/src/cmd/matcher/download.rs +++ b/src/cmd/matcher/download.rs @@ -4,9 +4,9 @@ use clap::ArgMatches; use ffsend_api::url::Url; use super::Matcher; -use cmd::arg::{ArgPassword, ArgUrl, CmdArgOption}; +use crate::cmd::arg::{ArgPassword, ArgUrl, CmdArgOption}; #[cfg(feature = "archive")] -use util::env_var_present; +use crate::util::env_var_present; /// The download command matcher. pub struct DownloadMatcher<'a> { diff --git a/src/cmd/matcher/exists.rs b/src/cmd/matcher/exists.rs index 927cb32..e932a83 100644 --- a/src/cmd/matcher/exists.rs +++ b/src/cmd/matcher/exists.rs @@ -3,7 +3,7 @@ use ffsend_api::url::Url; use clap::ArgMatches; use super::Matcher; -use cmd::arg::{ArgUrl, CmdArgOption}; +use crate::cmd::arg::{ArgUrl, CmdArgOption}; /// The exists command matcher. pub struct ExistsMatcher<'a> { diff --git a/src/cmd/matcher/info.rs b/src/cmd/matcher/info.rs index f112913..18701a0 100644 --- a/src/cmd/matcher/info.rs +++ b/src/cmd/matcher/info.rs @@ -3,7 +3,7 @@ use ffsend_api::url::Url; use clap::ArgMatches; use super::Matcher; -use cmd::arg::{ArgOwner, ArgPassword, ArgUrl, CmdArgOption}; +use crate::cmd::arg::{ArgOwner, ArgPassword, ArgUrl, CmdArgOption}; /// The info command matcher. pub struct InfoMatcher<'a> { diff --git a/src/cmd/matcher/main.rs b/src/cmd/matcher/main.rs index 83ee508..2b8cf14 100644 --- a/src/cmd/matcher/main.rs +++ b/src/cmd/matcher/main.rs @@ -4,9 +4,9 @@ use std::path::PathBuf; use clap::ArgMatches; use super::Matcher; -use util::env_var_present; +use crate::util::env_var_present; #[cfg(feature = "history")] -use util::{quit_error_msg, ErrorHintsBuilder}; +use crate::util::{quit_error_msg, ErrorHintsBuilder}; /// The main command matcher. pub struct MainMatcher<'a> { diff --git a/src/cmd/matcher/params.rs b/src/cmd/matcher/params.rs index 5302437..537f91b 100644 --- a/src/cmd/matcher/params.rs +++ b/src/cmd/matcher/params.rs @@ -2,7 +2,7 @@ use clap::ArgMatches; use ffsend_api::url::Url; use super::Matcher; -use cmd::arg::{ArgDownloadLimit, ArgOwner, ArgUrl, CmdArgOption}; +use crate::cmd::arg::{ArgDownloadLimit, ArgOwner, ArgUrl, CmdArgOption}; /// The params command matcher. pub struct ParamsMatcher<'a> { diff --git a/src/cmd/matcher/password.rs b/src/cmd/matcher/password.rs index b5f92c7..382a693 100644 --- a/src/cmd/matcher/password.rs +++ b/src/cmd/matcher/password.rs @@ -2,9 +2,9 @@ use clap::ArgMatches; use ffsend_api::url::Url; use rpassword::prompt_password_stderr; -use cmd::arg::{ArgGenPassphrase, ArgOwner, ArgPassword, ArgUrl, CmdArgFlag, CmdArgOption}; -use cmd::matcher::{MainMatcher, Matcher}; -use util::check_empty_password; +use crate::cmd::arg::{ArgGenPassphrase, ArgOwner, ArgPassword, ArgUrl, CmdArgFlag, CmdArgOption}; +use crate::cmd::matcher::{MainMatcher, Matcher}; +use crate::util::check_empty_password; /// The password command matcher. pub struct PasswordMatcher<'a> { diff --git a/src/cmd/matcher/upload.rs b/src/cmd/matcher/upload.rs index 1c2895d..d7c3fe1 100644 --- a/src/cmd/matcher/upload.rs +++ b/src/cmd/matcher/upload.rs @@ -3,10 +3,10 @@ use ffsend_api::action::params::PARAMS_DEFAULT_DOWNLOAD as DOWNLOAD_DEFAULT; use ffsend_api::url::Url; use super::Matcher; -use cmd::arg::{ +use crate::cmd::arg::{ ArgDownloadLimit, ArgGenPassphrase, ArgHost, ArgPassword, CmdArgFlag, CmdArgOption, }; -use util::{env_var_present, quit_error_msg, ErrorHintsBuilder}; +use crate::util::{env_var_present, quit_error_msg, ErrorHintsBuilder}; /// The upload command matcher. pub struct UploadMatcher<'a> { diff --git a/src/cmd/subcmd/debug.rs b/src/cmd/subcmd/debug.rs index d9b0100..d408510 100644 --- a/src/cmd/subcmd/debug.rs +++ b/src/cmd/subcmd/debug.rs @@ -1,6 +1,6 @@ use clap::{App, SubCommand}; -use cmd::arg::{ArgHost, CmdArg}; +use crate::cmd::arg::{ArgHost, CmdArg}; /// The debug command definition. pub struct CmdDebug; diff --git a/src/cmd/subcmd/delete.rs b/src/cmd/subcmd/delete.rs index f8c1e9d..54ebcf5 100644 --- a/src/cmd/subcmd/delete.rs +++ b/src/cmd/subcmd/delete.rs @@ -1,6 +1,6 @@ use clap::{App, SubCommand}; -use cmd::arg::{ArgOwner, ArgUrl, CmdArg}; +use crate::cmd::arg::{ArgOwner, ArgUrl, CmdArg}; /// The delete command definition. pub struct CmdDelete; diff --git a/src/cmd/subcmd/download.rs b/src/cmd/subcmd/download.rs index 9e41bdd..dfdd7cb 100644 --- a/src/cmd/subcmd/download.rs +++ b/src/cmd/subcmd/download.rs @@ -1,6 +1,6 @@ use clap::{App, Arg, SubCommand}; -use cmd::arg::{ArgPassword, ArgUrl, CmdArg}; +use crate::cmd::arg::{ArgPassword, ArgUrl, CmdArg}; /// The download command definition. pub struct CmdDownload; diff --git a/src/cmd/subcmd/exists.rs b/src/cmd/subcmd/exists.rs index cfef750..73462c9 100644 --- a/src/cmd/subcmd/exists.rs +++ b/src/cmd/subcmd/exists.rs @@ -1,6 +1,6 @@ use clap::{App, SubCommand}; -use cmd::arg::{ArgUrl, CmdArg}; +use crate::cmd::arg::{ArgUrl, CmdArg}; /// The exists command definition. pub struct CmdExists; diff --git a/src/cmd/subcmd/info.rs b/src/cmd/subcmd/info.rs index e706e4b..09be8fa 100644 --- a/src/cmd/subcmd/info.rs +++ b/src/cmd/subcmd/info.rs @@ -1,6 +1,6 @@ use clap::{App, SubCommand}; -use cmd::arg::{ArgOwner, ArgPassword, ArgUrl, CmdArg}; +use crate::cmd::arg::{ArgOwner, ArgPassword, ArgUrl, CmdArg}; /// The info command definition. pub struct CmdInfo; diff --git a/src/cmd/subcmd/params.rs b/src/cmd/subcmd/params.rs index 3a991a7..58a17c0 100644 --- a/src/cmd/subcmd/params.rs +++ b/src/cmd/subcmd/params.rs @@ -1,6 +1,6 @@ use clap::{App, SubCommand}; -use cmd::arg::{ArgDownloadLimit, ArgOwner, ArgUrl, CmdArg}; +use crate::cmd::arg::{ArgDownloadLimit, ArgOwner, ArgUrl, CmdArg}; /// The params command definition. pub struct CmdParams; diff --git a/src/cmd/subcmd/password.rs b/src/cmd/subcmd/password.rs index 011e7eb..296626a 100644 --- a/src/cmd/subcmd/password.rs +++ b/src/cmd/subcmd/password.rs @@ -1,6 +1,6 @@ use clap::{App, SubCommand}; -use cmd::arg::{ArgGenPassphrase, ArgOwner, ArgPassword, ArgUrl, CmdArg}; +use crate::cmd::arg::{ArgGenPassphrase, ArgOwner, ArgPassword, ArgUrl, CmdArg}; /// The password command definition. pub struct CmdPassword; diff --git a/src/cmd/subcmd/upload.rs b/src/cmd/subcmd/upload.rs index 4f6974c..b070191 100644 --- a/src/cmd/subcmd/upload.rs +++ b/src/cmd/subcmd/upload.rs @@ -1,7 +1,7 @@ use clap::{App, Arg, SubCommand}; use ffsend_api::action::params::PARAMS_DEFAULT_DOWNLOAD_STR as DOWNLOAD_DEFAULT; -use cmd::arg::{ArgDownloadLimit, ArgGenPassphrase, ArgHost, ArgPassword, CmdArg}; +use crate::cmd::arg::{ArgDownloadLimit, ArgGenPassphrase, ArgHost, ArgPassword, CmdArg}; /// The upload command definition. pub struct CmdUpload; diff --git a/src/error.rs b/src/error.rs index eac66b2..18bf5cf 100644 --- a/src/error.rs +++ b/src/error.rs @@ -4,11 +4,11 @@ use ffsend_api::action::params::Error as ParamsError; use ffsend_api::action::password::Error as PasswordError; use ffsend_api::file::remote_file::FileParseError; -use action::download::Error as CliDownloadError; +use crate::action::download::Error as CliDownloadError; #[cfg(feature = "history")] -use action::history::Error as CliHistoryError; -use action::info::Error as CliInfoError; -use action::upload::Error as CliUploadError; +use crate::action::history::Error as CliHistoryError; +use crate::action::info::Error as CliInfoError; +use crate::action::upload::Error as CliUploadError; #[derive(Fail, Debug)] pub enum Error { diff --git a/src/history.rs b/src/history.rs index 0157938..1f0c069 100644 --- a/src/history.rs +++ b/src/history.rs @@ -11,7 +11,7 @@ use self::version_compare::{CompOp, VersionCompare}; use failure::Fail; use ffsend_api::file::remote_file::RemoteFile; -use util::{print_error, print_warning}; +use crate::util::{print_error, print_warning}; /// The minimum supported history file version. const VERSION_MIN: &str = "0.0.1"; diff --git a/src/history_tool.rs b/src/history_tool.rs index f4539f2..5f924eb 100644 --- a/src/history_tool.rs +++ b/src/history_tool.rs @@ -1,9 +1,9 @@ use failure::Fail; use ffsend_api::file::remote_file::RemoteFile; -use cmd::matcher::MainMatcher; -use history::{Error as HistoryError, History}; -use util::print_error; +use crate::cmd::matcher::MainMatcher; +use crate::history::{Error as HistoryError, History}; +use crate::util::print_error; /// Load the history from the given path, add the given file, and save it /// again. diff --git a/src/main.rs b/src/main.rs index 0724e1f..0f4f9fb 100644 --- a/src/main.rs +++ b/src/main.rs @@ -33,22 +33,22 @@ mod host; mod progress; mod util; -use action::debug::Debug; -use action::delete::Delete; -use action::download::Download; -use action::exists::Exists; +use crate::action::debug::Debug; +use crate::action::delete::Delete; +use crate::action::download::Download; +use crate::action::exists::Exists; #[cfg(feature = "history")] -use action::history::History; -use action::info::Info; -use action::params::Params; -use action::password::Password; -use action::upload::Upload; -use cmd::{ +use crate::action::history::History; +use crate::action::info::Info; +use crate::action::params::Params; +use crate::action::password::Password; +use crate::action::upload::Upload; +use crate::cmd::{ matcher::{MainMatcher, Matcher}, Handler, }; -use error::Error; -use util::{bin_name, highlight, quit_error, ErrorHints}; +use crate::error::Error; +use crate::util::{bin_name, highlight, quit_error, ErrorHints}; /// Application entrypoint. fn main() { diff --git a/src/util.rs b/src/util.rs index 51c4d57..9fa6200 100644 --- a/src/util.rs +++ b/src/util.rs @@ -32,7 +32,7 @@ use failure::{Compat, Error}; use ffsend_api::url::Url; use rpassword::prompt_password_stderr; -use cmd::matcher::MainMatcher; +use crate::cmd::matcher::MainMatcher; /// Print a success message. pub fn print_success(msg: &str) { @@ -297,7 +297,7 @@ pub fn set_clipboard(content: String) -> Result<(), ClipboardError> { return Err(match err.kind() { IoErrorKind::NotFound => ClipboardError::NoXclip, _ => ClipboardError::Xclip(err), - }) + }); } };