pub(crate) fn queue_unused_entries(&self) -> Result<bool, (SourceId, QueryError)> {
        let mut inner = self.inner.borrow_mut();

        let unused = inner
            .indexed
            .values()
            .flat_map(|entries| entries.iter())
            .map(|e| e.item.clone())
            .collect::<Vec<_>>();

        if unused.is_empty() {
            return Ok(false);
        }

        for query_item in unused {
            // NB: recursive queries might remove from `indexed`, so we expect
            // to miss things here.
            if let Some(meta) = inner
                .query_meta(query_item.location.span, &query_item.item, Used::Unused)
                .map_err(|e| (query_item.location.source_id, e))?
            {
                inner.visitor.visit_meta(
                    query_item.location.source_id,
                    &meta,
                    query_item.location.span,
                );
            }
        }

        Ok(true)
    }
/// Remove and queue up unused entries for building.
///
/// Returns boolean indicating if any unused entries were queued up.
Remove and queue up unused entries for building.
Returns boolean indicating if any unused entries were queued up.
Remove and queue up unused entries for building . Returns boolean indicating if any unused entries were queued up .
pub(crate) fn queue_unused_entries(&self) -> Result<bool, (SourceId, QueryError)> {
        let mut inner = self.inner.borrow_mut();
        let unused = inner
            .indexed
            .values()
            .flat_map(|entries| entries.iter())
            .map(|e| e.item.clone())
            .collect::<Vec<_>>();
        if unused.is_empty() {
            return Ok(false);
        }
        for query_item in unused {
            // NB: recursive queries might remove from `indexed`, so we expect
            // to miss things here.
            if let Some(meta) = inner
                .query_meta(query_item.location.span, &query_item.item, Used::Unused)
                .map_err(|e| (query_item.location.source_id, e))?
            {
                inner.visitor.visit_meta(
                    query_item.location.source_id,
                    &meta,
                    query_item.location.span,
                );
            }
        }
        Ok(true)
    }
pub ( crate ) fn queue_unused_entries ( & self ) -> Result < bool , ( SourceId , QueryError ) > { let mut inner = self . inner . borrow_mut ( ) ; let unused = inner . indexed . values ( ) . flat_map ( | entries | entries . iter ( ) ) . map ( | e | e . item . clone ( ) ) . collect :: < Vec < _ > > ( ) ; if unused . is_empty ( ) { return Ok ( false ) ; } for query_item in unused { // NB: recursive queries might remove from `indexed`, so we expect // to miss things here. if let Some ( meta ) = inner . query_meta ( query_item . location . span , & query_item . item , Used :: Unused ) . map_err ( | e | ( query_item . location . source_id , e ) ) ? { inner . visitor . visit_meta ( query_item . location . source_id , & meta , query_item . location . span , ) ; } } Ok ( true ) }
Remove and queue up unused entries for building.
Remove and queue up unused entries for building .
&self
&self