diff --git a/rustworkx-core/src/centrality.rs b/rustworkx-core/src/centrality.rs index c099c63048..59d0ca1dcb 100644 --- a/rustworkx-core/src/centrality.rs +++ b/rustworkx-core/src/centrality.rs @@ -738,7 +738,7 @@ where { let alpha: f64 = alpha.unwrap_or(0.1); - let mut beta: HashMap = beta_map.unwrap_or_else(HashMap::new); + let mut beta: HashMap = beta_map.unwrap_or_default(HashMap::new); if beta.is_empty() { // beta_map was none