[wip] documentation
- added more notes - minor cleanup
This commit is contained in:
parent
4bf18631d4
commit
6ca3e6c9dd
3 changed files with 10 additions and 9 deletions
1
notes.md
1
notes.md
|
|
@ -50,6 +50,7 @@
|
|||
- "continue" and "new" flags to avoid user interaction
|
||||
- "quiet" flag to disable output entirely
|
||||
- "verbose" flag to adjust RUST_LOG for `shrupl` crate
|
||||
- some switch to change log to "pretty-print"
|
||||
|
||||
- client error rework
|
||||
- current variants are too "low level"
|
||||
|
|
|
|||
|
|
@ -27,8 +27,8 @@ impl Checked {
|
|||
///
|
||||
/// # Errors
|
||||
///
|
||||
/// - calls `fs::metadata(path)` or `fs::canonicalize`
|
||||
/// - path does not correspond to a regular file
|
||||
/// - from `fs::metadata(path)` or `fs::canonicalize`
|
||||
/// - given path does not correspond to a regular file
|
||||
pub fn new(value: impl AsRef<Path>) -> io::Result<Self> {
|
||||
let meta = fs::metadata(&value)?;
|
||||
if meta.is_file() {
|
||||
|
|
@ -52,7 +52,7 @@ impl Checked {
|
|||
///
|
||||
/// # Errors
|
||||
///
|
||||
/// -
|
||||
/// TODO documentation after `ClientError` rework
|
||||
pub fn start_upload(
|
||||
self,
|
||||
client: &impl sharry::Client,
|
||||
|
|
|
|||
12
src/main.rs
12
src/main.rs
|
|
@ -73,12 +73,6 @@ fn print_error(e: &ClientError) {
|
|||
fn main() {
|
||||
env_logger::init();
|
||||
|
||||
println!(
|
||||
"{} to {}!",
|
||||
style("Welcome").magenta().bold(),
|
||||
style("ShrUpl").yellow().bold(),
|
||||
);
|
||||
|
||||
let check_ctrlc = {
|
||||
let stop = Arc::new(AtomicBool::new(false));
|
||||
let stop_ctrlc = stop.clone();
|
||||
|
|
@ -99,6 +93,12 @@ fn main() {
|
|||
let args = Cli::parse();
|
||||
info!("args: {args:#?}");
|
||||
|
||||
println!(
|
||||
"{} to {}!",
|
||||
style("Welcome").magenta().bold(),
|
||||
style("ShrUpl").yellow().bold(),
|
||||
);
|
||||
|
||||
let mut state = AppState::try_resume(&args)
|
||||
.and_then(|state| prompt_continue().then_some(state))
|
||||
.unwrap_or_else(|| {
|
||||
|
|
|
|||
Loading…
Reference in a new issue