mirror of
https://github.com/timvisee/ffsend.git
synced 2025-10-05 02:09:27 +02:00
Fix nonce auth, dependency, incorrect wording and warnings previous commits
This commit is contained in:
parent
7425c6c405
commit
dd65b51cb5
7 changed files with 13 additions and 18 deletions
|
@ -15,12 +15,12 @@ name = "ffsend"
|
|||
[features]
|
||||
default = ["archive", "clipboard", "history"]
|
||||
|
||||
# Compile with file archiving support
|
||||
archive = ["tar"]
|
||||
|
||||
# Compile with file history support
|
||||
history = []
|
||||
|
||||
# Compile with file archiving support
|
||||
archive = []
|
||||
|
||||
# Compile without colored output support
|
||||
no-color = ["colored/no-color"]
|
||||
|
||||
|
@ -42,7 +42,7 @@ prettytable-rs = "0.6"
|
|||
rpassword = "2.0"
|
||||
serde = "1.0"
|
||||
serde_derive = "1.0"
|
||||
tar = { version = "0.4", option = true }
|
||||
tar = { version = "0.4", optional = true }
|
||||
tempfile = "3"
|
||||
toml = "0.4"
|
||||
version-compare = "0.0.6"
|
||||
|
|
|
@ -9,14 +9,11 @@ use prettytable::{
|
|||
};
|
||||
|
||||
use cmd::matcher::{
|
||||
debug::DebugMatcher,
|
||||
main::MainMatcher,
|
||||
Matcher,
|
||||
};
|
||||
use error::ActionError;
|
||||
#[cfg(feature = "history")]
|
||||
use history_tool;
|
||||
use util::{ensure_owner_token, format_duration, print_success};
|
||||
use util::format_duration;
|
||||
|
||||
/// A file debug action.
|
||||
pub struct Debug<'a> {
|
||||
|
@ -36,7 +33,6 @@ impl<'a> Debug<'a> {
|
|||
pub fn invoke(&self) -> Result<(), ActionError> {
|
||||
// Create the command matchers
|
||||
let matcher_main = MainMatcher::with(self.cmd_matches).unwrap();
|
||||
let matcher_debug = DebugMatcher::with(self.cmd_matches).unwrap();
|
||||
|
||||
// Create a table for all debug information
|
||||
let mut table = Table::new();
|
||||
|
@ -60,7 +56,7 @@ impl<'a> Debug<'a> {
|
|||
Cell::new(&format_duration(Duration::seconds(SEND_DEFAULT_EXPIRE_TIME))),
|
||||
]));
|
||||
|
||||
// Print the table
|
||||
// Print the debug table
|
||||
table.printstd();
|
||||
|
||||
Ok(())
|
||||
|
|
|
@ -129,7 +129,7 @@ impl<'a> Info<'a> {
|
|||
// The file size
|
||||
let size = metadata.size();
|
||||
table.add_row(Row::new(vec![
|
||||
Cell::new("MIME:"),
|
||||
Cell::new("size:"),
|
||||
Cell::new(
|
||||
&if size >= 1024 {
|
||||
format!("{} ({} B)", format_bytes(size), size)
|
||||
|
@ -164,6 +164,9 @@ impl<'a> Info<'a> {
|
|||
),
|
||||
]));
|
||||
|
||||
// Print the info table
|
||||
table.printstd();
|
||||
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,12 +1,10 @@
|
|||
use ffsend_api::url::Url;
|
||||
|
||||
use clap::ArgMatches;
|
||||
|
||||
use cmd::arg::{ArgOwner, ArgPassword, ArgUrl, CmdArgOption};
|
||||
use super::Matcher;
|
||||
|
||||
/// The debug command matcher.
|
||||
pub struct DebugMatcher<'a> {
|
||||
#[allow(dead_code)]
|
||||
matches: &'a ArgMatches<'a>,
|
||||
}
|
||||
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
use clap::{App, SubCommand};
|
||||
|
||||
use cmd::arg::{ArgOwner, ArgPassword, ArgUrl, CmdArg};
|
||||
|
||||
/// The debug command definition.
|
||||
pub struct CmdDebug;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue