diff --git a/openraft/src/core/raft_core.rs b/openraft/src/core/raft_core.rs index d5ccb4127..5bd10d554 100644 --- a/openraft/src/core/raft_core.rs +++ b/openraft/src/core/raft_core.rs @@ -55,7 +55,9 @@ use crate::error::RPCError; use crate::error::Timeout; use crate::log_id::LogIdOptionExt; use crate::log_id::RaftLogId; -use crate::metrics::{RaftDataMetrics, RaftMetrics, RaftServerMetrics}; +use crate::metrics::RaftDataMetrics; +use crate::metrics::RaftMetrics; +use crate::metrics::RaftServerMetrics; use crate::metrics::ReplicationMetrics; use crate::network::RPCOption; use crate::network::RPCTypes; diff --git a/tests/tests/metrics/t10_server_metrics_and_data_metrics.rs b/tests/tests/metrics/t10_server_metrics_and_data_metrics.rs index 4e0f006bf..c85204e46 100644 --- a/tests/tests/metrics/t10_server_metrics_and_data_metrics.rs +++ b/tests/tests/metrics/t10_server_metrics_and_data_metrics.rs @@ -40,12 +40,7 @@ async fn server_metrics_and_data_metrics() -> Result<()> { log_index += router.client_request_many(0, "foo", n).await?; let last_log_index = data_metrics.borrow().last_log.unwrap_or_default().index; - assert_eq!( - last_log_index, - log_index, - "last_log_index should be {:?}", - log_index - ); + assert_eq!(last_log_index, log_index, "last_log_index should be {:?}", log_index); assert!( !server_metrics.borrow().has_changed(), "server metrics should not update"