Skip to content

Commit

Permalink
change Err from Debug to Display
Browse files Browse the repository at this point in the history
as reported by a user on Discord, the output of the Debug on error is a useless: 'Any { .. }'
switch to `Display` via to_string
  • Loading branch information
PSeitz committed Sep 26, 2023
1 parent 34920d3 commit 32e7177
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/indexer/index_writer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -620,7 +620,7 @@ impl IndexWriter {
for worker_handle in former_workers_join_handle {
let indexing_worker_result = worker_handle
.join()
.map_err(|e| TantivyError::ErrorInThread(format!("{e:?}")))?;
.map_err(|e| TantivyError::ErrorInThread(e.to_string()))?;
indexing_worker_result?;
self.add_indexing_worker()?;
}
Expand Down Expand Up @@ -2186,7 +2186,9 @@ mod tests {
assert!(is_sorted(&ids_in_segment));

fn is_sorted<T>(data: &[T]) -> bool
where T: Ord {
where
T: Ord,
{
data.windows(2).all(|w| w[0] <= w[1])
}
}
Expand Down

0 comments on commit 32e7177

Please sign in to comment.