Do the changes for the Delete function
This commit is contained in:
parent
03ee6e6838
commit
d5dd55820a
1 changed files with 2 additions and 3 deletions
|
@ -6,13 +6,14 @@
|
||||||
|
|
||||||
use std::ops::Deref;
|
use std::ops::Deref;
|
||||||
use toml::Value;
|
use toml::Value;
|
||||||
|
use uuid::Uuid;
|
||||||
|
|
||||||
use libimagstore::store::Store;
|
use libimagstore::store::Store;
|
||||||
use libimagstore::storeid::IntoStoreId;
|
use libimagstore::storeid::IntoStoreId;
|
||||||
use module_path::ModuleEntryPath;
|
use module_path::ModuleEntryPath;
|
||||||
|
|
||||||
/// With the uuid we get the storeid and than we can delete the entry
|
/// With the uuid we get the storeid and than we can delete the entry
|
||||||
fn deleteFunc(uuid: i32, store : &Store) {
|
fn deleteFunc(uuid: Uuid, store : &Store) {
|
||||||
// With this we can read from a .json File
|
// With this we can read from a .json File
|
||||||
// let mut file = File::open("text.json").unwrap();
|
// let mut file = File::open("text.json").unwrap();
|
||||||
// let mut data = String::new();
|
// let mut data = String::new();
|
||||||
|
@ -25,7 +26,5 @@ fn deleteFunc(uuid: i32, store : &Store) {
|
||||||
let store_id = ModuleEntryPath::new(format!("taskwarrior/{}", uuid)).into_storeid();
|
let store_id = ModuleEntryPath::new(format!("taskwarrior/{}", uuid)).into_storeid();
|
||||||
// It deletes an entry
|
// It deletes an entry
|
||||||
store.delete(store_id);
|
store.delete(store_id);
|
||||||
|
|
||||||
println!("The {} was delete!", uuid);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue