Skip to content

Commit bfca78c

Browse files
timopollmeiergreenbonebot
authored andcommitted
Reformat with cargo fmt
1 parent c9dad44 commit bfca78c

2 files changed

Lines changed: 3 additions & 8 deletions

File tree

src/api/openapi_tests.rs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,7 @@ use std::sync::Arc;
77
use axum::{body::to_bytes, response::IntoResponse};
88

99
use crate::{
10-
app::AppState,
11-
http::router::build_router,
12-
scan::DefaultScanService,
10+
app::AppState, http::router::build_router, scan::DefaultScanService,
1311
storage::test_support::temporary_sqlite_storage,
1412
};
1513

@@ -30,9 +28,7 @@ async fn openapi_yaml_handler_returns_valid_yaml() {
3028
let response = get_openapi_yaml().await.into_response();
3129
assert_eq!(response.status(), 200);
3230

33-
let body = to_bytes(response.into_body(), usize::MAX)
34-
.await
35-
.unwrap();
31+
let body = to_bytes(response.into_body(), usize::MAX).await.unwrap();
3632
let yaml = String::from_utf8(body.to_vec()).unwrap();
3733
assert!(
3834
yaml.contains("openapi:"),

src/http/router.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,7 @@ pub fn build_router(state: AppState) -> Router {
6060
#[cfg(feature = "api-docs")]
6161
{
6262
use crate::api::openapi::ApiDoc;
63-
let swagger_ui = SwaggerUi::new("/doc")
64-
.url("/doc/openapi.json", ApiDoc::openapi());
63+
let swagger_ui = SwaggerUi::new("/doc").url("/doc/openapi.json", ApiDoc::openapi());
6564
router = router
6665
.route("/doc/openapi.yml", get(api::openapi::get_openapi_yaml))
6766
.merge(swagger_ui);

0 commit comments

Comments
 (0)