fn program_search(offset: usize, include_end: bool) -> impl Fn(&Program) -> std::cmp::Ordering {
        move |program: &Program| {
            if offset < program.start {
                std::cmp::Ordering::Greater
            } else if (include_end && offset > program.end)
                || (!include_end && offset >= program.end)
            {
                std::cmp::Ordering::Less
            } else {
                std::cmp::Ordering::Equal
            }
        }
    }
/// Comparator for finding a program at a document offset.
/// If `include_end`, the ending offset of a program should be included when searching for a
/// program at the offset.
Comparator for finding a program at a document offset.
If `include_end`, the ending offset of a program should be included when searching for a
program at the offset.
Comparator for finding a program at a document offset . If ` include_end ` the ending offset of a program should be included when searching for a program at the offset .
fn program_search(offset: usize, include_end: bool) -> impl Fn(&Program) -> std::cmp::Ordering {
        move |program: &Program| {
            if offset < program.start {
                std::cmp::Ordering::Greater
            } else if (include_end && offset > program.end)
                || (!include_end && offset >= program.end)
            {
                std::cmp::Ordering::Less
            } else {
                std::cmp::Ordering::Equal
            }
        }
    }
fn program_search ( offset : usize , include_end : bool ) -> impl Fn ( & Program ) -> std :: cmp :: Ordering { move | program : & Program | { if offset < program . start { std :: cmp :: Ordering :: Greater } else if ( include_end && offset > program . end ) || ( ! include_end && offset >= program . end ) { std :: cmp :: Ordering :: Less } else { std :: cmp :: Ordering :: Equal } } }
Comparator for finding a program at a document offset.
Comparator for finding a program at a document offset .
offset
usize
include_end
bool
offset
usize
include_end
bool