mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-03 03:47:02 +02:00
Remove panics
This commit is contained in:
parent
3fc16c627d
commit
ef007d547d
3 changed files with 14 additions and 11 deletions
|
@ -100,7 +100,7 @@ pub struct EmbedderStatsView {
|
|||
|
||||
impl From<&EmbedderStats> for EmbedderStatsView {
|
||||
fn from(stats: &EmbedderStats) -> Self {
|
||||
let errors = stats.errors.read().unwrap();
|
||||
let errors = stats.errors.read().unwrap_or_else(|p| p.into_inner());
|
||||
Self {
|
||||
total_count: stats.total_count.load(std::sync::atomic::Ordering::Relaxed),
|
||||
error_count: errors.1 as usize,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue