pub fn resolved_assists(db: &RootDatabase, range: FileRange) -> Vec<ResolvedAssist> {
    let sema = Semantics::new(db);
    let ctx = AssistCtx::new(&sema, range, true);
    let mut a = handlers::all()
        .iter()
        .filter_map(|f| f(ctx.clone()))
        .flat_map(|it| it.0)
        .map(|it| it.into_resolved().unwrap())
        .collect::<Vec<_>>();
    a.sort_by_key(|it| it.action.target.map_or(TextUnit::from(!0u32), |it| it.len()));
    a
}
/// Return all the assists applicable at the given position.
///
/// Assists are returned in the "resolved" state, that is with edit fully
/// computed.
Return all the assists applicable at the given position.
Assists are returned in the "resolved" state, that is with edit fully
computed.
Return all the assists applicable at the given position . Assists are returned in the " resolved " state that is with edit fully computed .
pub fn resolved_assists(db: &RootDatabase, range: FileRange) -> Vec<ResolvedAssist> {
    let sema = Semantics::new(db);
    let ctx = AssistCtx::new(&sema, range, true);
    let mut a = handlers::all()
        .iter()
        .filter_map(|f| f(ctx.clone()))
        .flat_map(|it| it.0)
        .map(|it| it.into_resolved().unwrap())
        .collect::<Vec<_>>();
    a.sort_by_key(|it| it.action.target.map_or(TextUnit::from(!0u32), |it| it.len()));
    a
}
pub fn resolved_assists ( db : & RootDatabase , range : FileRange ) -> Vec < ResolvedAssist > { let sema = Semantics :: new ( db ) ; let ctx = AssistCtx :: new ( & sema , range , true ) ; let mut a = handlers :: all ( ) . iter ( ) . filter_map ( | f | f ( ctx . clone ( ) ) ) . flat_map ( | it | it . 0 ) . map ( | it | it . into_resolved ( ) . unwrap ( ) ) . collect :: < Vec < _ > > ( ) ; a . sort_by_key ( | it | it . action . target . map_or ( TextUnit :: from ( ! 0u32 ) , | it | it . len ( ) ) ) ; a }
Return all the assists applicable at the given position.
Return all the assists applicable at the given position .
db
&RootDatabase
range
FileRange
db
&RootDatabase
range
FileRange