Update to Rust edition 2018

This commit is contained in:
timvisee 2019-01-12 23:34:38 +01:00
parent 26bdcebe00
commit 3ceff500cf
No known key found for this signature in database
GPG key ID: 109CBA0BF74036C2
40 changed files with 105 additions and 102 deletions

View file

@ -21,6 +21,7 @@ categories = [
exclude = [ exclude = [
"res/*", "res/*",
] ]
edition = "2018"
[package.metadata.deb] [package.metadata.deb]
section = "utility" section = "utility"

View file

@ -146,7 +146,7 @@ all available subcommands.
Because `ffsend` is still in alpha, only limited installation options are Because `ffsend` is still in alpha, only limited installation options are
available right now. available right now.
### Arch AUR package #### Arch AUR package
`ffsend` on `aur.archlinux.org`][aur-ffsend] `ffsend` on `aur.archlinux.org`][aur-ffsend]
```bash ```bash

View file

@ -3,10 +3,10 @@ use clap::ArgMatches;
use ffsend_api::config::SEND_DEFAULT_EXPIRE_TIME; use ffsend_api::config::SEND_DEFAULT_EXPIRE_TIME;
use prettytable::{format::FormatBuilder, Cell, Row, Table}; use prettytable::{format::FormatBuilder, Cell, Row, Table};
use client::to_duration; use crate::client::to_duration;
use cmd::matcher::{debug::DebugMatcher, main::MainMatcher, Matcher}; use crate::cmd::matcher::{debug::DebugMatcher, main::MainMatcher, Matcher};
use error::ActionError; use crate::error::ActionError;
use util::{features_list, format_bool, format_duration}; use crate::util::{features_list, format_bool, format_duration};
/// A file debug action. /// A file debug action.
pub struct Debug<'a> { pub struct Debug<'a> {

View file

@ -2,12 +2,12 @@ use clap::ArgMatches;
use ffsend_api::action::delete::{Delete as ApiDelete, Error as DeleteError}; use ffsend_api::action::delete::{Delete as ApiDelete, Error as DeleteError};
use ffsend_api::file::remote_file::{FileParseError, RemoteFile}; use ffsend_api::file::remote_file::{FileParseError, RemoteFile};
use client::create_client; use crate::client::create_client;
use cmd::matcher::{delete::DeleteMatcher, main::MainMatcher, Matcher}; use crate::cmd::matcher::{delete::DeleteMatcher, main::MainMatcher, Matcher};
use error::ActionError; use crate::error::ActionError;
#[cfg(feature = "history")] #[cfg(feature = "history")]
use history_tool; use crate::history_tool;
use util::{ensure_owner_token, print_success}; use crate::util::{ensure_owner_token, print_success};
/// A file delete action. /// A file delete action.
pub struct Delete<'a> { pub struct Delete<'a> {

View file

@ -16,13 +16,13 @@ use ffsend_api::reader::ProgressReporter;
use tempfile::{Builder as TempBuilder, NamedTempFile}; use tempfile::{Builder as TempBuilder, NamedTempFile};
#[cfg(feature = "archive")] #[cfg(feature = "archive")]
use archive::archive::Archive; use crate::archive::archive::Archive;
use client::create_transfer_client; use crate::client::create_transfer_client;
use cmd::matcher::{download::DownloadMatcher, main::MainMatcher, Matcher}; use crate::cmd::matcher::{download::DownloadMatcher, main::MainMatcher, Matcher};
#[cfg(feature = "history")] #[cfg(feature = "history")]
use history_tool; use crate::history_tool;
use progress::ProgressBar; use crate::progress::ProgressBar;
use util::{ use crate::util::{
ensure_enough_space, ensure_password, prompt_yes, quit, quit_error, quit_error_msg, ErrorHints, ensure_enough_space, ensure_password, prompt_yes, quit, quit_error, quit_error_msg, ErrorHints,
}; };

View file

@ -2,12 +2,12 @@ use clap::ArgMatches;
use ffsend_api::action::exists::{Error as ExistsError, Exists as ApiExists}; use ffsend_api::action::exists::{Error as ExistsError, Exists as ApiExists};
use ffsend_api::file::remote_file::{FileParseError, RemoteFile}; use ffsend_api::file::remote_file::{FileParseError, RemoteFile};
use client::create_client; use crate::client::create_client;
use cmd::matcher::main::MainMatcher; use crate::cmd::matcher::main::MainMatcher;
use cmd::matcher::{exists::ExistsMatcher, Matcher}; use crate::cmd::matcher::{exists::ExistsMatcher, Matcher};
use error::ActionError; use crate::error::ActionError;
#[cfg(feature = "history")] #[cfg(feature = "history")]
use history_tool; use crate::history_tool;
/// A file exists action. /// A file exists action.
pub struct Exists<'a> { pub struct Exists<'a> {

View file

@ -1,10 +1,10 @@
use clap::ArgMatches; use clap::ArgMatches;
use prettytable::{format::FormatBuilder, Cell, Row, Table}; use prettytable::{format::FormatBuilder, Cell, Row, Table};
use cmd::matcher::{main::MainMatcher, Matcher}; use crate::cmd::matcher::{main::MainMatcher, Matcher};
use error::ActionError; use crate::error::ActionError;
use history::{History as HistoryManager, LoadError as HistoryLoadError}; use crate::history::{History as HistoryManager, LoadError as HistoryLoadError};
use util::format_duration; use crate::util::format_duration;
/// A history action. /// A history action.
pub struct History<'a> { pub struct History<'a> {

View file

@ -7,11 +7,13 @@ use ffsend_api::action::metadata::Metadata as ApiMetadata;
use ffsend_api::file::remote_file::{FileParseError, RemoteFile}; use ffsend_api::file::remote_file::{FileParseError, RemoteFile};
use prettytable::{format::FormatBuilder, Cell, Row, Table}; use prettytable::{format::FormatBuilder, Cell, Row, Table};
use client::create_client; use crate::client::create_client;
use cmd::matcher::{info::InfoMatcher, main::MainMatcher, Matcher}; use crate::cmd::matcher::{info::InfoMatcher, main::MainMatcher, Matcher};
#[cfg(feature = "history")] #[cfg(feature = "history")]
use history_tool; use crate::history_tool;
use util::{ensure_owner_token, ensure_password, format_bytes, format_duration, print_error}; use crate::util::{
ensure_owner_token, ensure_password, format_bytes, format_duration, print_error,
};
/// A file info action. /// A file info action.
pub struct Info<'a> { pub struct Info<'a> {

View file

@ -2,12 +2,12 @@ use clap::ArgMatches;
use ffsend_api::action::params::{Error as ParamsError, Params as ApiParams, ParamsDataBuilder}; use ffsend_api::action::params::{Error as ParamsError, Params as ApiParams, ParamsDataBuilder};
use ffsend_api::file::remote_file::RemoteFile; use ffsend_api::file::remote_file::RemoteFile;
use client::create_client; use crate::client::create_client;
use cmd::matcher::{main::MainMatcher, params::ParamsMatcher, Matcher}; use crate::cmd::matcher::{main::MainMatcher, params::ParamsMatcher, Matcher};
use error::ActionError; use crate::error::ActionError;
#[cfg(feature = "history")] #[cfg(feature = "history")]
use history_tool; use crate::history_tool;
use util::{ensure_owner_token, print_success}; use crate::util::{ensure_owner_token, print_success};
/// A file parameters action. /// A file parameters action.
pub struct Params<'a> { pub struct Params<'a> {

View file

@ -3,12 +3,12 @@ use ffsend_api::action::password::{Error as PasswordError, Password as ApiPasswo
use ffsend_api::file::remote_file::RemoteFile; use ffsend_api::file::remote_file::RemoteFile;
use prettytable::{format::FormatBuilder, Cell, Row, Table}; use prettytable::{format::FormatBuilder, Cell, Row, Table};
use client::create_client; use crate::client::create_client;
use cmd::matcher::{main::MainMatcher, password::PasswordMatcher, Matcher}; use crate::cmd::matcher::{main::MainMatcher, password::PasswordMatcher, Matcher};
use error::ActionError; use crate::error::ActionError;
#[cfg(feature = "history")] #[cfg(feature = "history")]
use history_tool; use crate::history_tool;
use util::{ensure_owner_token, print_success}; use crate::util::{ensure_owner_token, print_success};
/// A file password action. /// A file password action.
pub struct Password<'a> { pub struct Password<'a> {

View file

@ -15,15 +15,15 @@ use prettytable::{format::FormatBuilder, Cell, Row, Table};
use tempfile::{Builder as TempBuilder, NamedTempFile}; use tempfile::{Builder as TempBuilder, NamedTempFile};
#[cfg(feature = "archive")] #[cfg(feature = "archive")]
use archive::archiver::Archiver; use crate::archive::archiver::Archiver;
use client::create_transfer_client; use crate::client::create_transfer_client;
use cmd::matcher::{MainMatcher, Matcher, UploadMatcher}; use crate::cmd::matcher::{MainMatcher, Matcher, UploadMatcher};
#[cfg(feature = "history")] #[cfg(feature = "history")]
use history_tool; use crate::history_tool;
use progress::ProgressBar; use crate::progress::ProgressBar;
#[cfg(feature = "clipboard")] #[cfg(feature = "clipboard")]
use util::set_clipboard; use crate::util::set_clipboard;
use util::{ use crate::util::{
format_bytes, open_url, print_error, print_error_msg, prompt_yes, quit, quit_error_msg, format_bytes, open_url, print_error, print_error_msg, prompt_yes, quit, quit_error_msg,
ErrorHintsBuilder, ErrorHintsBuilder,
}; };

View file

@ -2,7 +2,7 @@ use std::time::Duration;
use ffsend_api::reqwest::{Client, ClientBuilder}; 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. /// Create the default client, which is used for generic Send requests.
/// ///

View file

@ -5,7 +5,7 @@ use ffsend_api::action::params::{
use super::{CmdArg, CmdArgFlag, CmdArgOption}; use super::{CmdArg, CmdArgFlag, CmdArgOption};
use util::{quit_error_msg, ErrorHintsBuilder}; use crate::util::{quit_error_msg, ErrorHintsBuilder};
/// The download limit argument. /// The download limit argument.
pub struct ArgDownloadLimit {} pub struct ArgDownloadLimit {}

View file

@ -4,8 +4,8 @@ use ffsend_api::config::SEND_DEFAULT_HOST;
use ffsend_api::url::Url; use ffsend_api::url::Url;
use super::{CmdArg, CmdArgOption}; use super::{CmdArg, CmdArgOption};
use host::parse_host; use crate::host::parse_host;
use util::{quit_error, ErrorHints}; use crate::util::{quit_error, ErrorHints};
/// The host argument. /// The host argument.
pub struct ArgHost {} pub struct ArgHost {}

View file

@ -1,8 +1,8 @@
use clap::{Arg, ArgMatches}; use clap::{Arg, ArgMatches};
use super::{CmdArg, CmdArgFlag, CmdArgOption}; use super::{CmdArg, CmdArgFlag, CmdArgOption};
use cmd::matcher::{MainMatcher, Matcher}; use crate::cmd::matcher::{MainMatcher, Matcher};
use util::prompt_owner_token; use crate::util::prompt_owner_token;
/// The owner argument. /// The owner argument.
pub struct ArgOwner {} pub struct ArgOwner {}

View file

@ -1,8 +1,8 @@
use clap::{Arg, ArgMatches}; use clap::{Arg, ArgMatches};
use super::{CmdArg, CmdArgFlag, CmdArgOption}; use super::{CmdArg, CmdArgFlag, CmdArgOption};
use cmd::matcher::{MainMatcher, Matcher}; use crate::cmd::matcher::{MainMatcher, Matcher};
use util::{check_empty_password, prompt_password}; use crate::util::{check_empty_password, prompt_password};
/// The password argument. /// The password argument.
pub struct ArgPassword {} pub struct ArgPassword {}

View file

@ -3,8 +3,8 @@ use failure::Fail;
use ffsend_api::url::Url; use ffsend_api::url::Url;
use super::{CmdArg, CmdArgOption}; use super::{CmdArg, CmdArgOption};
use host::parse_host; use crate::host::parse_host;
use util::{quit_error, ErrorHints}; use crate::util::{quit_error, ErrorHints};
/// The URL argument. /// The URL argument.
pub struct ArgUrl {} pub struct ArgUrl {}

View file

@ -13,9 +13,9 @@ use super::subcmd::CmdHistory;
use super::subcmd::{ use super::subcmd::{
CmdDebug, CmdDelete, CmdDownload, CmdExists, CmdInfo, CmdParams, CmdPassword, CmdUpload, 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")] #[cfg(feature = "history")]
use util::app_history_file_path_string; use crate::util::app_history_file_path_string;
#[cfg(feature = "history")] #[cfg(feature = "history")]
lazy_static! { lazy_static! {

View file

@ -2,7 +2,7 @@ use clap::ArgMatches;
use ffsend_api::url::Url; use ffsend_api::url::Url;
use super::Matcher; use super::Matcher;
use cmd::arg::{ArgHost, CmdArgOption}; use crate::cmd::arg::{ArgHost, CmdArgOption};
/// The debug command matcher. /// The debug command matcher.
pub struct DebugMatcher<'a> { pub struct DebugMatcher<'a> {

View file

@ -2,7 +2,7 @@ use clap::ArgMatches;
use ffsend_api::url::Url; use ffsend_api::url::Url;
use super::Matcher; use super::Matcher;
use cmd::arg::{ArgOwner, ArgUrl, CmdArgOption}; use crate::cmd::arg::{ArgOwner, ArgUrl, CmdArgOption};
/// The delete command matcher. /// The delete command matcher.
pub struct DeleteMatcher<'a> { pub struct DeleteMatcher<'a> {

View file

@ -4,9 +4,9 @@ use clap::ArgMatches;
use ffsend_api::url::Url; use ffsend_api::url::Url;
use super::Matcher; use super::Matcher;
use cmd::arg::{ArgPassword, ArgUrl, CmdArgOption}; use crate::cmd::arg::{ArgPassword, ArgUrl, CmdArgOption};
#[cfg(feature = "archive")] #[cfg(feature = "archive")]
use util::env_var_present; use crate::util::env_var_present;
/// The download command matcher. /// The download command matcher.
pub struct DownloadMatcher<'a> { pub struct DownloadMatcher<'a> {

View file

@ -3,7 +3,7 @@ use ffsend_api::url::Url;
use clap::ArgMatches; use clap::ArgMatches;
use super::Matcher; use super::Matcher;
use cmd::arg::{ArgUrl, CmdArgOption}; use crate::cmd::arg::{ArgUrl, CmdArgOption};
/// The exists command matcher. /// The exists command matcher.
pub struct ExistsMatcher<'a> { pub struct ExistsMatcher<'a> {

View file

@ -3,7 +3,7 @@ use ffsend_api::url::Url;
use clap::ArgMatches; use clap::ArgMatches;
use super::Matcher; use super::Matcher;
use cmd::arg::{ArgOwner, ArgPassword, ArgUrl, CmdArgOption}; use crate::cmd::arg::{ArgOwner, ArgPassword, ArgUrl, CmdArgOption};
/// The info command matcher. /// The info command matcher.
pub struct InfoMatcher<'a> { pub struct InfoMatcher<'a> {

View file

@ -4,9 +4,9 @@ use std::path::PathBuf;
use clap::ArgMatches; use clap::ArgMatches;
use super::Matcher; use super::Matcher;
use util::env_var_present; use crate::util::env_var_present;
#[cfg(feature = "history")] #[cfg(feature = "history")]
use util::{quit_error_msg, ErrorHintsBuilder}; use crate::util::{quit_error_msg, ErrorHintsBuilder};
/// The main command matcher. /// The main command matcher.
pub struct MainMatcher<'a> { pub struct MainMatcher<'a> {

View file

@ -2,7 +2,7 @@ use clap::ArgMatches;
use ffsend_api::url::Url; use ffsend_api::url::Url;
use super::Matcher; use super::Matcher;
use cmd::arg::{ArgDownloadLimit, ArgOwner, ArgUrl, CmdArgOption}; use crate::cmd::arg::{ArgDownloadLimit, ArgOwner, ArgUrl, CmdArgOption};
/// The params command matcher. /// The params command matcher.
pub struct ParamsMatcher<'a> { pub struct ParamsMatcher<'a> {

View file

@ -2,9 +2,9 @@ use clap::ArgMatches;
use ffsend_api::url::Url; use ffsend_api::url::Url;
use rpassword::prompt_password_stderr; use rpassword::prompt_password_stderr;
use cmd::arg::{ArgGenPassphrase, ArgOwner, ArgPassword, ArgUrl, CmdArgFlag, CmdArgOption}; use crate::cmd::arg::{ArgGenPassphrase, ArgOwner, ArgPassword, ArgUrl, CmdArgFlag, CmdArgOption};
use cmd::matcher::{MainMatcher, Matcher}; use crate::cmd::matcher::{MainMatcher, Matcher};
use util::check_empty_password; use crate::util::check_empty_password;
/// The password command matcher. /// The password command matcher.
pub struct PasswordMatcher<'a> { pub struct PasswordMatcher<'a> {

View file

@ -3,10 +3,10 @@ use ffsend_api::action::params::PARAMS_DEFAULT_DOWNLOAD as DOWNLOAD_DEFAULT;
use ffsend_api::url::Url; use ffsend_api::url::Url;
use super::Matcher; use super::Matcher;
use cmd::arg::{ use crate::cmd::arg::{
ArgDownloadLimit, ArgGenPassphrase, ArgHost, ArgPassword, CmdArgFlag, CmdArgOption, 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. /// The upload command matcher.
pub struct UploadMatcher<'a> { pub struct UploadMatcher<'a> {

View file

@ -1,6 +1,6 @@
use clap::{App, SubCommand}; use clap::{App, SubCommand};
use cmd::arg::{ArgHost, CmdArg}; use crate::cmd::arg::{ArgHost, CmdArg};
/// The debug command definition. /// The debug command definition.
pub struct CmdDebug; pub struct CmdDebug;

View file

@ -1,6 +1,6 @@
use clap::{App, SubCommand}; use clap::{App, SubCommand};
use cmd::arg::{ArgOwner, ArgUrl, CmdArg}; use crate::cmd::arg::{ArgOwner, ArgUrl, CmdArg};
/// The delete command definition. /// The delete command definition.
pub struct CmdDelete; pub struct CmdDelete;

View file

@ -1,6 +1,6 @@
use clap::{App, Arg, SubCommand}; use clap::{App, Arg, SubCommand};
use cmd::arg::{ArgPassword, ArgUrl, CmdArg}; use crate::cmd::arg::{ArgPassword, ArgUrl, CmdArg};
/// The download command definition. /// The download command definition.
pub struct CmdDownload; pub struct CmdDownload;

View file

@ -1,6 +1,6 @@
use clap::{App, SubCommand}; use clap::{App, SubCommand};
use cmd::arg::{ArgUrl, CmdArg}; use crate::cmd::arg::{ArgUrl, CmdArg};
/// The exists command definition. /// The exists command definition.
pub struct CmdExists; pub struct CmdExists;

View file

@ -1,6 +1,6 @@
use clap::{App, SubCommand}; use clap::{App, SubCommand};
use cmd::arg::{ArgOwner, ArgPassword, ArgUrl, CmdArg}; use crate::cmd::arg::{ArgOwner, ArgPassword, ArgUrl, CmdArg};
/// The info command definition. /// The info command definition.
pub struct CmdInfo; pub struct CmdInfo;

View file

@ -1,6 +1,6 @@
use clap::{App, SubCommand}; use clap::{App, SubCommand};
use cmd::arg::{ArgDownloadLimit, ArgOwner, ArgUrl, CmdArg}; use crate::cmd::arg::{ArgDownloadLimit, ArgOwner, ArgUrl, CmdArg};
/// The params command definition. /// The params command definition.
pub struct CmdParams; pub struct CmdParams;

View file

@ -1,6 +1,6 @@
use clap::{App, SubCommand}; 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. /// The password command definition.
pub struct CmdPassword; pub struct CmdPassword;

View file

@ -1,7 +1,7 @@
use clap::{App, Arg, SubCommand}; use clap::{App, Arg, SubCommand};
use ffsend_api::action::params::PARAMS_DEFAULT_DOWNLOAD_STR as DOWNLOAD_DEFAULT; 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. /// The upload command definition.
pub struct CmdUpload; pub struct CmdUpload;

View file

@ -4,11 +4,11 @@ use ffsend_api::action::params::Error as ParamsError;
use ffsend_api::action::password::Error as PasswordError; use ffsend_api::action::password::Error as PasswordError;
use ffsend_api::file::remote_file::FileParseError; use ffsend_api::file::remote_file::FileParseError;
use action::download::Error as CliDownloadError; use crate::action::download::Error as CliDownloadError;
#[cfg(feature = "history")] #[cfg(feature = "history")]
use action::history::Error as CliHistoryError; use crate::action::history::Error as CliHistoryError;
use action::info::Error as CliInfoError; use crate::action::info::Error as CliInfoError;
use action::upload::Error as CliUploadError; use crate::action::upload::Error as CliUploadError;
#[derive(Fail, Debug)] #[derive(Fail, Debug)]
pub enum Error { pub enum Error {

View file

@ -11,7 +11,7 @@ use self::version_compare::{CompOp, VersionCompare};
use failure::Fail; use failure::Fail;
use ffsend_api::file::remote_file::RemoteFile; 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. /// The minimum supported history file version.
const VERSION_MIN: &str = "0.0.1"; const VERSION_MIN: &str = "0.0.1";

View file

@ -1,9 +1,9 @@
use failure::Fail; use failure::Fail;
use ffsend_api::file::remote_file::RemoteFile; use ffsend_api::file::remote_file::RemoteFile;
use cmd::matcher::MainMatcher; use crate::cmd::matcher::MainMatcher;
use history::{Error as HistoryError, History}; use crate::history::{Error as HistoryError, History};
use util::print_error; use crate::util::print_error;
/// Load the history from the given path, add the given file, and save it /// Load the history from the given path, add the given file, and save it
/// again. /// again.

View file

@ -33,22 +33,22 @@ mod host;
mod progress; mod progress;
mod util; mod util;
use action::debug::Debug; use crate::action::debug::Debug;
use action::delete::Delete; use crate::action::delete::Delete;
use action::download::Download; use crate::action::download::Download;
use action::exists::Exists; use crate::action::exists::Exists;
#[cfg(feature = "history")] #[cfg(feature = "history")]
use action::history::History; use crate::action::history::History;
use action::info::Info; use crate::action::info::Info;
use action::params::Params; use crate::action::params::Params;
use action::password::Password; use crate::action::password::Password;
use action::upload::Upload; use crate::action::upload::Upload;
use cmd::{ use crate::cmd::{
matcher::{MainMatcher, Matcher}, matcher::{MainMatcher, Matcher},
Handler, Handler,
}; };
use error::Error; use crate::error::Error;
use util::{bin_name, highlight, quit_error, ErrorHints}; use crate::util::{bin_name, highlight, quit_error, ErrorHints};
/// Application entrypoint. /// Application entrypoint.
fn main() { fn main() {

View file

@ -32,7 +32,7 @@ use failure::{Compat, Error};
use ffsend_api::url::Url; use ffsend_api::url::Url;
use rpassword::prompt_password_stderr; use rpassword::prompt_password_stderr;
use cmd::matcher::MainMatcher; use crate::cmd::matcher::MainMatcher;
/// Print a success message. /// Print a success message.
pub fn print_success(msg: &str) { pub fn print_success(msg: &str) {
@ -297,7 +297,7 @@ pub fn set_clipboard(content: String) -> Result<(), ClipboardError> {
return Err(match err.kind() { return Err(match err.kind() {
IoErrorKind::NotFound => ClipboardError::NoXclip, IoErrorKind::NotFound => ClipboardError::NoXclip,
_ => ClipboardError::Xclip(err), _ => ClipboardError::Xclip(err),
}) });
} }
}; };