pub async fn delete(
        &self,
        annotations: Vec<Annotation>,
        force: bool,
    ) -> color_eyre::Result<()> {
        let num_annotations = annotations.len();
        if !annotations.is_empty()
            && (force
                || Confirm::new()
                    .with_prompt(&format!("Delete {} annotations?", num_annotations))
                    .default(false)
                    .interact()?)
        {
            let ids = annotations
                .iter()
                .map(|a| a.id.to_owned())
                .collect::<Vec<_>>();
            self.delete_annotations(&ids)?;
            self.api.delete_annotations(&ids).await?;
            println!("{} annotations deleted", num_annotations);
        }
        Ok(())
    }
/// Delete filtered annotations from gooseberry (by adding an ignore tag) or also from Hypothesis
Delete filtered annotations from gooseberry (by adding an ignore tag) or also from Hypothesis
Delete filtered annotations from gooseberry ( by adding an ignore tag ) or also from Hypothesis
pub async fn delete(
        &self,
        annotations: Vec<Annotation>,
        force: bool,
    ) -> color_eyre::Result<()> {
        let num_annotations = annotations.len();
        if !annotations.is_empty()
            && (force
                || Confirm::new()
                    .with_prompt(&format!("Delete {} annotations?", num_annotations))
                    .default(false)
                    .interact()?)
        {
            let ids = annotations
                .iter()
                .map(|a| a.id.to_owned())
                .collect::<Vec<_>>();
            self.delete_annotations(&ids)?;
            self.api.delete_annotations(&ids).await?;
            println!("{} annotations deleted", num_annotations);
        }
        Ok(())
    }
pub async fn delete ( & self , annotations : Vec < Annotation > , force : bool , ) -> color_eyre :: Result < ( ) > { let num_annotations = annotations . len ( ) ; if ! annotations . is_empty ( ) && ( force || Confirm :: new ( ) . with_prompt ( & format ! ( " " num_annotations ) ) . default ( false ) . interact ( ) ? ) { let ids = annotations . iter ( ) . map ( | a | a . id . to_owned ( ) ) . collect :: < Vec < _ > > ( ) ; self . delete_annotations ( & ids ) ? ; self . api . delete_annotations ( & ids ) . await ? ; println ! ( " " num_annotations ) ; } Ok ( ( ) ) }
Delete filtered annotations from gooseberry (by adding an ignore tag) or also from Hypothesis
Delete filtered annotations from gooseberry ( by adding an ignore tag ) or also from Hypothesis
&self
annotations
Vec<Annotation>
force
bool
&self
annotations
Vec<Annotation>
force
bool