Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

change Err from Debug to Display #2190

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/indexer/index_writer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -620,7 +620,7 @@
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()))?;

Check failure on line 623 in src/indexer/index_writer.rs

View workflow job for this annotation

GitHub Actions / clippy

the method `to_string` exists for struct `Box<dyn Any + Send>`, but its trait bounds were not satisfied

error[E0599]: the method `to_string` exists for struct `Box<dyn Any + Send>`, but its trait bounds were not satisfied --> src/indexer/index_writer.rs:623:60 | 623 | .map_err(|e| TantivyError::ErrorInThread(e.to_string()))?; | ^^^^^^^^^ method cannot be called on `Box<dyn Any + Send>` due to unsatisfied trait bounds --> /rustc/d5c2e9c342b358556da91d61ed4133f6f50fc0c3/library/core/src/any.rs:181:1 | = note: doesn't satisfy `_: Display` | = note: doesn't satisfy `_: ToString` --> /rustc/d5c2e9c342b358556da91d61ed4133f6f50fc0c3/library/alloc/src/boxed.rs:195:1 ::: /rustc/d5c2e9c342b358556da91d61ed4133f6f50fc0c3/library/alloc/src/boxed.rs:198:1 | = note: doesn't satisfy `_: Display` | = note: doesn't satisfy `_: ToString` | = note: the following trait bounds were not satisfied: `std::boxed::Box<dyn std::any::Any + std::marker::Send>: std::fmt::Display` which is required by `std::boxed::Box<dyn std::any::Any + std::marker::Send>: std::string::ToString` `dyn std::any::Any + std::marker::Send: std::fmt::Display` which is required by `dyn std::any::Any + std::marker::Send: std::string::ToString`
indexing_worker_result?;
self.add_indexing_worker()?;
}
Expand Down
Loading