Skip to content

Commit

Permalink
Fix warnings from pagefind_web
Browse files Browse the repository at this point in the history
  • Loading branch information
bglw committed Jan 19, 2025
1 parent 118a84a commit 9f8b6ec
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pagefind_web/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ pub fn init_pagefind(metadata_bytes: &[u8]) -> *mut SearchIndex {

match search_index.decode_metadata(metadata_bytes) {
Ok(_) => Box::into_raw(Box::new(search_index)),
#[allow(unused_variables)]
Err(e) => {
#[cfg(debug_assertions)]
debug_log(&format!("{:#?}", e));
Expand Down Expand Up @@ -185,6 +186,7 @@ pub fn load_index_chunk(ptr: *mut SearchIndex, chunk_bytes: &[u8]) -> *mut Searc

match search_index.decode_index_chunk(chunk_bytes) {
Ok(_) => Box::into_raw(search_index),
#[allow(unused_variables)]
Err(e) => {
debug!({ format!("{:#?}", e) });
std::ptr::null_mut::<SearchIndex>()
Expand All @@ -199,6 +201,7 @@ pub fn load_filter_chunk(ptr: *mut SearchIndex, chunk_bytes: &[u8]) -> *mut Sear

match search_index.decode_filter_index_chunk(chunk_bytes) {
Ok(_) => Box::into_raw(search_index),
#[allow(unused_variables)]
Err(e) => {
debug!({ format!("{:#?}", e) });
std::ptr::null_mut::<SearchIndex>()
Expand Down

0 comments on commit 9f8b6ec

Please sign in to comment.