Skip to content

Commit 84dc79f

Browse files
maxholmanclaude
andcommitted
style: use .into() for From conversions
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 957990f commit 84dc79f

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

crates/api/src/handlers.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ pub async fn stats(State(state): State<ApiState>) -> Result<Json<StatsResponse>,
266266
.map_err(|_| StatusCode::INTERNAL_SERVER_ERROR)?;
267267

268268
match resp.response {
269-
Some(management_response::Response::Stats(s)) => Ok(Json(StatsResponse::from(s))),
269+
Some(management_response::Response::Stats(s)) => Ok(Json(s.into())),
270270
_ => Err(StatusCode::INTERNAL_SERVER_ERROR),
271271
}
272272
}

crates/core/src/ipc.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ fn dispatch_request(request: &ManagementRequest, api: &dyn NodeApi) -> Managemen
304304
}
305305

306306
Some(management_request::Request::Stats(_)) => {
307-
management_response::Response::Stats(StatsResponse::from(api.metrics()))
307+
management_response::Response::Stats(api.metrics().into())
308308
}
309309

310310
Some(management_request::Request::Peers(_)) => {

0 commit comments

Comments
 (0)