fn delete_item(s: &mut Cursive) {
    // Get the settings dir
    let set_path = settings::settings_dir();
    // retrieve the WLE table
    let mut table = s
        .find_name::<TableView<Watchlist, WatchColumn>>("watch-list")
        .unwrap();
    // Matches the given item index
    match table.item() {
        None => s.add_layer(Dialog::info("No item to delete")),
        // If there's a value, delete it
        Some(index) => {
            let value = table.borrow_item(index).unwrap();
            settings::db_delete_wl(&set_path, &value.title).expect("Failed to delete item");
            table.remove_item(index);
        }
    };
}
/// Deletes the currently selected item in the watch-list

Deletes the currently selected item in the watch-list
Deletes the currently selected item in the watch - list
fn delete_item(s: &mut Cursive) {
    // Get the settings dir
    let set_path = settings::settings_dir();
    // retrieve the WLE table
    let mut table = s
        .find_name::<TableView<Watchlist, WatchColumn>>("watch-list")
        .unwrap();
    // Matches the given item index
    match table.item() {
        None => s.add_layer(Dialog::info("No item to delete")),
        // If there's a value, delete it
        Some(index) => {
            let value = table.borrow_item(index).unwrap();
            settings::db_delete_wl(&set_path, &value.title).expect("Failed to delete item");
            table.remove_item(index);
        }
    };
}
fn delete_item ( s : & mut Cursive ) { // Get the settings dir
 let set_path = settings :: settings_dir ( ) ; // retrieve the WLE table
 let mut table = s . find_name :: < TableView < Watchlist , WatchColumn > > ( " " ) . unwrap ( ) ; // Matches the given item index
 match table . item ( ) { None => s . add_layer ( Dialog :: info ( " " ) ) , // If there's a value, delete it
 Some ( index ) => { let value = table . borrow_item ( index ) . unwrap ( ) ; settings :: db_delete_wl ( & set_path , & value . title ) . expect ( " " ) ; table . remove_item ( index ) ; } } ; }
Deletes the currently selected item in the watch-list
Deletes the currently selected item in the watch - list
s
&mut Cursive
s
&mut Cursive