pub fn delete_behavior(&mut self, index: &usize) {
        let id = self.behaviors_ids[*index].clone();

        if let Some(behavior) = self.behaviors.get(&id) {
            let _ = std::fs::remove_file(behavior.path.clone());
        }

        self.behaviors_names.remove(*index);
        self.behaviors_ids.remove(*index);
        self.behaviors.remove(&id);
    }
/// Delete the behavior of the given id
Delete the behavior of the given id
Delete the behavior of the given id
pub fn delete_behavior(&mut self, index: &usize) {
        let id = self.behaviors_ids[*index].clone();
        if let Some(behavior) = self.behaviors.get(&id) {
            let _ = std::fs::remove_file(behavior.path.clone());
        }
        self.behaviors_names.remove(*index);
        self.behaviors_ids.remove(*index);
        self.behaviors.remove(&id);
    }
pub fn delete_behavior ( & mut self , index : & usize ) { let id = self . behaviors_ids [ * index ] . clone ( ) ; if let Some ( behavior ) = self . behaviors . get ( & id ) { let _ = std :: fs :: remove_file ( behavior . path . clone ( ) ) ; } self . behaviors_names . remove ( * index ) ; self . behaviors_ids . remove ( * index ) ; self . behaviors . remove ( & id ) ; }
Delete the behavior of the given id
Delete the behavior of the given id
&mut self
index
&usize
&mut self
index
&usize