Cargo clippy and cargo fmt

This commit is contained in:
Simon Goller 2024-05-09 15:00:50 +02:00
parent b0000c0117
commit ed609cf06c
22 changed files with 286 additions and 94 deletions

View file

@ -90,7 +90,10 @@ pub async fn get_booking<RestState: RestStateDef>(
) -> Response {
error_handler(
(async {
let booking = rest_state.booking_service().get(booking_id, ().into()).await?;
let booking = rest_state
.booking_service()
.get(booking_id, ().into())
.await?;
Ok(Response::builder()
.status(200)
.body(Body::new(
@ -129,7 +132,10 @@ pub async fn delete_booking<RestState: RestStateDef>(
) -> Response {
error_handler(
(async {
rest_state.booking_service().delete(booking_id, ().into()).await?;
rest_state
.booking_service()
.delete(booking_id, ().into())
.await?;
Ok(Response::builder().status(200).body(Body::empty()).unwrap())
})
.await,

View file

@ -162,7 +162,6 @@ pub async fn delete_sales_person<RestState: RestStateDef>(
)
}
pub async fn get_sales_person_user<RestState: RestStateDef>(
rest_state: State<RestState>,
Path(sales_person_id): Path<Uuid>,
@ -213,4 +212,4 @@ pub async fn delete_sales_person_user<RestState: RestStateDef>(
})
.await,
)
}
}

View file

@ -127,7 +127,12 @@ pub async fn get_slot<RestState: RestStateDef>(
) -> Response {
error_handler(
(async {
let slot = SlotTO::from(&rest_state.slot_service().get_slot(&slot_id, ().into()).await?);
let slot = SlotTO::from(
&rest_state
.slot_service()
.get_slot(&slot_id, ().into())
.await?,
);
Ok(Response::builder()
.status(200)
.body(Body::new(serde_json::to_string(&slot).unwrap()))