remove text_io
This commit is contained in:
parent
8a689437cf
commit
0a1d29d743
@ -10,7 +10,6 @@ edition = "2018"
|
||||
anyhow = "1.0.34"
|
||||
chrono = "0.4.19"
|
||||
walkdir = "2.3.1"
|
||||
text_io = "0.1.8"
|
||||
clap = "2.33.3"
|
||||
dialoguer = "0.7.1"
|
||||
fstream = "0.1.2"
|
||||
|
@ -2,7 +2,6 @@ use anyhow::{anyhow, Result};
|
||||
use chrono::Utc;
|
||||
use dialoguer::{theme::ColorfulTheme, Confirm, Select};
|
||||
use std::{env, fs, process::Command};
|
||||
use text_io::read;
|
||||
use walkdir::WalkDir;
|
||||
|
||||
/// Get the path to the root directory of all notes.
|
||||
|
@ -2,7 +2,6 @@ use crate::rnote::notes;
|
||||
use anyhow::{anyhow, Result};
|
||||
use clap::ArgMatches;
|
||||
use dialoguer::{theme::ColorfulTheme, Input};
|
||||
use text_io::read;
|
||||
|
||||
pub fn new(matches: &ArgMatches) -> Result<()> {
|
||||
let header = match matches.value_of("header") {
|
||||
@ -19,10 +18,9 @@ pub fn new(matches: &ArgMatches) -> Result<()> {
|
||||
pub fn remove(matches: &ArgMatches) -> Result<()> {
|
||||
let header = match matches.value_of("header") {
|
||||
Some(s) => s.to_owned(),
|
||||
None => {
|
||||
print!("Enter the name of your note: ");
|
||||
read!()
|
||||
}
|
||||
None => Input::with_theme(&ColorfulTheme::default())
|
||||
.with_prompt("Name of your note")
|
||||
.interact_text()?,
|
||||
};
|
||||
notes::remove(&header)?;
|
||||
Ok(())
|
||||
|
Loading…
Reference in New Issue
Block a user