Skip to content

Commit 385521c

Browse files
committed
Update CI to no longer deny linter warnings
This can be a bit of a difficulty for folks opening PRs and then the linter complains about completely unrelated code and denies their PR. Instead, we continue to warn about these issues, but we do not block CI.
1 parent b6fa63c commit 385521c

File tree

4 files changed

+9
-5
lines changed

4 files changed

+9
-5
lines changed

.github/workflows/ci.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
uses: actions-rs/clippy-check@v1
3030
with:
3131
token: ${{ secrets.GITHUB_TOKEN }}
32-
args: --all-targets -- -D warnings
32+
args: --all-targets
3333

3434
- name: Setup | Toolchain (rustfmt)
3535
uses: actions-rs/toolchain@v1

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ Subheadings to categorize changes are `added, changed, deprecated, removed, fixe
1313
- Updated gloo-worker example to use gloo-worker crate v2.1.
1414
- Our website (trunkrs.dev) now only updates on new releases.
1515
- Additional attributes are now passed through script tags (fixes #429)
16+
- Updated internal http stack to axum v0.6.0.
1617
### fixed
1718
- Nested WS proxies - if `backend=ws://localhost:8000/ws` is set, queries for `ws://localhost:8080/ws/entityX` will be linked with `ws://localhost:8000/ws/entityX`
1819
- Updated all dependencies in both Trunk and its examples, to fix currently open security advisories for old dependencies.

src/proxy.rs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
use std::sync::Arc;
22

33
use anyhow::Context;
4-
use axum::RequestExt;
54
use axum::body::Body;
65
use axum::extract::ws::{Message as MsgAxm, WebSocket, WebSocketUpgrade};
76
use axum::extract::State;
87
use axum::http::{Request, Response, Uri};
98
use axum::routing::{any, get, Router};
9+
use axum::RequestExt;
1010
use futures_util::sink::SinkExt;
1111
use futures_util::stream::StreamExt;
1212
use reqwest::header::HeaderValue;
@@ -76,7 +76,7 @@ impl ProxyHandlerHttp {
7676
self.path(),
7777
any(Self::proxy_http_request)
7878
.layer(TraceLayer::new_for_http())
79-
.with_state(self.clone())
79+
.with_state(self.clone()),
8080
)
8181
}
8282

@@ -89,7 +89,10 @@ impl ProxyHandlerHttp {
8989

9090
/// Proxy the given request to the target backend.
9191
#[tracing::instrument(level = "debug", skip(state, req))]
92-
async fn proxy_http_request(State(state): State<Arc<Self>>, req: Request<Body>) -> ServerResult<Response<Body>> {
92+
async fn proxy_http_request(
93+
State(state): State<Arc<Self>>,
94+
req: Request<Body>,
95+
) -> ServerResult<Response<Body>> {
9396
// Construct the outbound URI & build a new request to be sent to the proxy backend.
9497
let outbound_uri = make_outbound_uri(&state.backend, req.uri())?;
9598
let mut outbound_req = state

src/tools.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ async fn find_system(app: Application, version: Option<&str>) -> Option<(PathBuf
263263
Ok((path, system_version)) => version
264264
.map(|v| v == system_version)
265265
.unwrap_or(true)
266-
.then(|| (path, system_version)),
266+
.then_some((path, system_version)),
267267
Err(e) => {
268268
tracing::debug!("system version not found for {}: {}", app.name(), e);
269269
None

0 commit comments

Comments
 (0)