fn resolve_scope(
    focused: Entity,
    direction: ScopeDirection,
    cycles: bool,
    siblings: &NonEmpty<Entity>,
) -> Option<&Entity> {
    let focused_index = siblings
        .iter()
        .enumerate()
        .find(|e| *e.1 == focused)
        .map(|e| e.0)?;
    let new_index = resolve_index(focused_index, cycles, direction, siblings.len().get() - 1);
    new_index.and_then(|i| siblings.get(i))
}
/// Returns the next or previous entity based on `direction`
Returns the next or previous entity based on `direction`
Returns the next or previous entity based on ` direction `
fn resolve_scope(
    focused: Entity,
    direction: ScopeDirection,
    cycles: bool,
    siblings: &NonEmpty<Entity>,
) -> Option<&Entity> {
    let focused_index = siblings
        .iter()
        .enumerate()
        .find(|e| *e.1 == focused)
        .map(|e| e.0)?;
    let new_index = resolve_index(focused_index, cycles, direction, siblings.len().get() - 1);
    new_index.and_then(|i| siblings.get(i))
}
fn resolve_scope ( focused : Entity , direction : ScopeDirection , cycles : bool , siblings : & NonEmpty < Entity > , ) -> Option < & Entity > { let focused_index = siblings . iter ( ) . enumerate ( ) . find ( | e | * e . 1 == focused ) . map ( | e | e . 0 ) ? ; let new_index = resolve_index ( focused_index , cycles , direction , siblings . len ( ) . get ( ) - 1 ) ; new_index . and_then ( | i | siblings . get ( i ) ) }
Returns the next or previous entity based on `direction`
Returns the next or previous entity based on ` direction `
focused
Entity
direction
ScopeDirection
cycles
bool
siblings
&NonEmpty<Entity>
focused
Entity
direction
ScopeDirection
cycles
bool
siblings
&NonEmpty<Entity>