Skip to content

Commit 998ba6a

Browse files
committed
fix clippy
1 parent d5fef1c commit 998ba6a

4 files changed

Lines changed: 10 additions & 12 deletions

File tree

mono/src/api/oauth/model.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,7 @@ impl From<CampsiteUserJson> for LoginUser {
1717
email: value.email.unwrap_or_default(),
1818
avatar_url: value.avatar_url,
1919
campsite_user_id: value.id,
20-
github_login: value
21-
.github_login
22-
.filter(|s| !s.trim().is_empty()),
20+
github_login: value.github_login.filter(|s| !s.trim().is_empty()),
2321
}
2422
}
2523
}

mono/src/api/router/orion_runner_router.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -290,9 +290,7 @@ async fn stream_runner_logs(
290290
)
291291
})?;
292292

293-
let byte_stream = upstream
294-
.bytes_stream()
295-
.map_err(|e| std::io::Error::other(e));
293+
let byte_stream = upstream.bytes_stream().map_err(std::io::Error::other);
296294

297295
Response::builder()
298296
.status(StatusCode::OK)

orion-server/src/scheduler.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -690,7 +690,13 @@ impl TaskScheduler {
690690
build_info: BuildInfo,
691691
msg: WSMessage,
692692
) -> Result<(), String> {
693-
claim_worker_for_build(&self.workers, &self.active_builds, chosen_id, build_info, msg)
693+
claim_worker_for_build(
694+
&self.workers,
695+
&self.active_builds,
696+
chosen_id,
697+
build_info,
698+
msg,
699+
)
694700
}
695701

696702
/// Try to dispatch queued task-bound builds (concurrent safe)

orion-server/src/service/api_v2_service.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -788,11 +788,7 @@ pub async fn build_retry(
788788
.scheduler
789789
.claim_worker_for_build(&chosen_id, build_info, msg)
790790
{
791-
return (
792-
StatusCode::BAD_GATEWAY,
793-
Json(json!({"message": e})),
794-
)
795-
.into_response();
791+
return (StatusCode::BAD_GATEWAY, Json(json!({"message": e}))).into_response();
796792
}
797793

798794
let now_tz = started_at.with_timezone(&chrono::FixedOffset::east_opt(0).unwrap());

0 commit comments

Comments
 (0)