pub fn delete_note(&mut self, id: &Vec<usize>) {
        for nid in id.iter() {
            let remove = self.notes.iter()
                .position(|n| &n.id == nid)
                .map(|e| self.notes.remove(e))
                .is_some();
            match remove {
                true => {
                    println!("deleted note {}", nid);
                }
                false => {
                    println!("note {} doesn't exist", nid);
                }
            }
        }
    }
/// delete an item from the profile
delete an item from the profile
delete an item from the profile
pub fn delete_note(&mut self, id: &Vec<usize>) {
        for nid in id.iter() {
            let remove = self.notes.iter()
                .position(|n| &n.id == nid)
                .map(|e| self.notes.remove(e))
                .is_some();
            match remove {
                true => {
                    println!("deleted note {}", nid);
                }
                false => {
                    println!("note {} doesn't exist", nid);
                }
            }
        }
    }
pub fn delete_note ( & mut self , id : & Vec < usize > ) { for nid in id . iter ( ) { let remove = self . notes . iter ( ) . position ( | n | & n . id == nid ) . map ( | e | self . notes . remove ( e ) ) . is_some ( ) ; match remove { true => { println ! ( " " nid ) ; } false => { println ! ( " " nid ) ; } } } }
delete an item from the profile
delete an item from the profile
&mut self
id
&Vec<usize>
&mut self
id
&Vec<usize>