mirror of
https://github.com/itsjunetime/tdf.git
synced 2026-06-02 08:01:47 -04:00
fmt
This commit is contained in:
+5
-1
@@ -169,7 +169,11 @@ pub async fn run_conversion_loop(
|
|||||||
)
|
)
|
||||||
};
|
};
|
||||||
|
|
||||||
log::debug!("got converted page for num {} with results {:?}", page_info.page_num, page_info.result_rects);
|
log::debug!(
|
||||||
|
"got converted page for num {} with results {:?}",
|
||||||
|
page_info.page_num,
|
||||||
|
page_info.result_rects
|
||||||
|
);
|
||||||
|
|
||||||
// update the iteration to the iteration that we stole this image from
|
// update the iteration to the iteration that we stole this image from
|
||||||
*iteration = new_iter;
|
*iteration = new_iter;
|
||||||
|
|||||||
+2
-4
@@ -536,8 +536,7 @@ fn search_page(
|
|||||||
) -> Result<Vec<Quad>, mupdf::error::Error> {
|
) -> Result<Vec<Quad>, mupdf::error::Error> {
|
||||||
search_term
|
search_term
|
||||||
.map(|term| {
|
.map(|term| {
|
||||||
page.to_text_page(TextPageFlags::empty())
|
page.to_text_page(TextPageFlags::empty()).and_then(|page| {
|
||||||
.and_then(|page| {
|
|
||||||
let mut v = Vec::with_capacity(trusted_search_results);
|
let mut v = Vec::with_capacity(trusted_search_results);
|
||||||
page.search_cb(term, &mut v, |v, results| {
|
page.search_cb(term, &mut v, |v, results| {
|
||||||
v.extend(results.iter().cloned());
|
v.extend(results.iter().cloned());
|
||||||
@@ -552,8 +551,7 @@ fn search_page(
|
|||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
fn count_search_results(page: &Page, search_term: &str) -> Result<usize, mupdf::error::Error> {
|
fn count_search_results(page: &Page, search_term: &str) -> Result<usize, mupdf::error::Error> {
|
||||||
page.to_text_page(TextPageFlags::empty())
|
page.to_text_page(TextPageFlags::empty()).and_then(|page| {
|
||||||
.and_then(|page| {
|
|
||||||
let mut count = 0;
|
let mut count = 0;
|
||||||
page.search_cb(search_term, &mut count, |count, results| {
|
page.search_cb(search_term, &mut count, |count, results| {
|
||||||
*count += results.len();
|
*count += results.len();
|
||||||
|
|||||||
Reference in New Issue
Block a user