@@ -57,8 +57,8 @@ struct PrevRender {
5757 num_search_found : Option < usize >
5858}
5959
60- const MUPDF_BLACK : i32 = 0 ;
61- const MUPDF_WHITE : i32 = i32:: from_be_bytes ( [ 0 , 0xff , 0xff , 0xff ] ) ;
60+ pub const MUPDF_BLACK : i32 = 0 ;
61+ pub const MUPDF_WHITE : i32 = i32:: from_be_bytes ( [ 0 , 0xff , 0xff , 0xff ] ) ;
6262
6363#[ inline]
6464pub fn fill_default < T : Default > ( vec : & mut Vec < T > , size : usize ) {
@@ -152,8 +152,8 @@ pub fn start_rendering(
152152
153153 sender. send ( Ok ( RenderInfo :: NumPages ( n_pages. get ( ) ) ) ) ?;
154154
155- // We're using this vec of bools to indicate which page numbers have already been rendered,
156- // to support people jumping to specific pages and having quick rendering results. We
155+ // We're using this vec to indicate which page numbers have already been rendered, to
156+ // support people jumping to specific pages and having quick rendering results. We
157157 // `split_at_mut` at 0 initially (which bascially makes `right == rendered && left == []`),
158158 // doing basically nothing, but if we get a notification that something has been jumped to,
159159 // then we can split at that page and render at both sides of it
@@ -277,7 +277,7 @@ pub fn start_rendering(
277277 // we only want to continue if one of the following is met:
278278 // 1. It failed to render last time (we want to retry)
279279 // 2. The `contained_term` is set to Unknown, meaning that we need to at least
280- // check if it contains the current term to see if it needs a re-render
280+ // check if it contains the current term to see if it needs a re-render
281281 if rendered. successful && rendered. num_search_found . is_some ( ) {
282282 continue ;
283283 }
@@ -570,4 +570,15 @@ impl Iterator for PopOnNext<'_> {
570570 fn next ( & mut self ) -> Option < Self :: Item > {
571571 self . inner . pop_front ( )
572572 }
573+
574+ fn size_hint ( & self ) -> ( usize , Option < usize > ) {
575+ let l = self . len ( ) ;
576+ ( l, Some ( l) )
577+ }
578+ }
579+
580+ impl ExactSizeIterator for PopOnNext < ' _ > {
581+ fn len ( & self ) -> usize {
582+ self . inner . len ( )
583+ }
573584}
0 commit comments