From 9430b40cf3a31a4d75d2b69fe9fe215c34e9d577 Mon Sep 17 00:00:00 2001 From: fiplox <56274824+fiplox@users.noreply.github.com> Date: Mon, 31 May 2021 18:07:44 +0200 Subject: [PATCH] rename "wipe_date" by "remove_by_date" --- src/rnote/notes.rs | 6 +++--- src/rnote/process.rs | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/rnote/notes.rs b/src/rnote/notes.rs index ce8e015..9cee5f0 100644 --- a/src/rnote/notes.rs +++ b/src/rnote/notes.rs @@ -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] diff --git a/src/rnote/process.rs b/src/rnote/process.rs index 1a9d167..d06eb26 100644 --- a/src/rnote/process.rs +++ b/src/rnote/process.rs @@ -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 => {