pub(crate) fn reindex_search(&mut self) {
        self.search_offsets = self
            .contents
            .windows(self.search_term.len())
            .enumerate()
            .filter_map(|(idx, w)| (w == self.search_term.as_bytes()).then_some(idx))
            .collect();

        if let Ok(hex_search_term) = hex::decode(self.search_term.replace(' ', "")) {
            self.search_offsets.extend(
                self.contents
                    .windows(hex_search_term.len())
                    .enumerate()
                    .filter_map(|(idx, w)| (w == hex_search_term).then_some(idx))
                    .collect::<Vec<usize>>(),
            );
        }
    }
Reindexes contents to find locations of the user's search term.
src/app.rs