mirror of
https://github.com/meilisearch/meilisearch.git
synced 2025-07-27 08:41:00 +00:00
Remove panics
This commit is contained in:
@ -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,
|
||||
|
Reference in New Issue
Block a user