rename "wipe_date" by "remove_by_date"

This commit is contained in:
fiplox 2021-05-31 18:07:44 +02:00
parent ae702b76cf
commit 9430b40cf3
2 changed files with 4 additions and 4 deletions

View File

@ -379,7 +379,7 @@ pub fn list_category(category: &str) -> Result<()> {
}
/// Remove all notes created at the given date in format `YYYY-MM-dd`.
pub fn wipe_date(date: &str) -> Result<()> {
pub fn remove_by_date(date: &str) -> Result<()> {
let base = get_base_path()?;
for (_, file) in WalkDir::new(base)
.into_iter()
@ -461,8 +461,8 @@ mod tests {
#[test]
#[ignore]
fn wipe_date_test() {
assert!(wipe_date("1999-10-10").is_ok());
fn remove_by_date_test() {
assert!(remove_by_date("1999-10-10").is_ok());
}
#[test]

View File

@ -32,7 +32,7 @@ pub fn remove(matches: &ArgMatches) -> Result<()> {
let date: String = Input::with_theme(&ColorfulTheme::default())
.with_prompt("Date")
.interact_text()?;
notes::wipe_date(&date)?;
notes::remove_by_date(&date)?;
return Ok(());
}
false => {