From d08b628a8665b34f7d5a3f0b245ca23a7267f5a5 Mon Sep 17 00:00:00 2001 From: Ihor Kalnytskyi Date: Sat, 6 Sep 2025 17:29:06 +0300 Subject: [PATCH] Make master green again MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The new Rust compiler got a lot smarter at spotting "dead code" and started complaining about some unused bits. Turns out the snippet update feature was never fully finished — but that’s no reason to rip out parts of the storage subsystem. On top of that, GitHub CI switched to a new macOS runner that doesn’t come with PostgreSQL pre-installed anymore. So we had to bump the action-setup-postgres version to get it running smoothly. --- .github/workflows/release.yml | 2 +- .github/workflows/tests.yml | 4 ++-- src/storage/sql/mod.rs | 1 + src/web/tracing.rs | 1 + 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 12159fd..eec2c03 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -73,7 +73,7 @@ jobs: override: true - name: Setup PostgreSQL - uses: ikalnytskyi/action-setup-postgres@v6 + uses: ikalnytskyi/action-setup-postgres@v7 - id: detect_host run: | diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 827062a..049bd96 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -77,7 +77,7 @@ jobs: override: true - name: Setup PostgreSQL - uses: ikalnytskyi/action-setup-postgres@v6 + uses: ikalnytskyi/action-setup-postgres@v7 id: postgres - name: Set ROCKET_DATABASE_URL @@ -127,7 +127,7 @@ jobs: override: true - name: Setup PostgreSQL - uses: ikalnytskyi/action-setup-postgres@v6 + uses: ikalnytskyi/action-setup-postgres@v7 id: postgres - run: | diff --git a/src/storage/sql/mod.rs b/src/storage/sql/mod.rs index cb359a4..df421c1 100644 --- a/src/storage/sql/mod.rs +++ b/src/storage/sql/mod.rs @@ -303,6 +303,7 @@ impl Storage for SqlStorage { Ok(snippet) } + #[allow(dead_code)] async fn update(&self, snippet: &Snippet) -> Result { // load the snippet from the db to check if we need to update anything let persisted_state = self.get(&snippet.id).await?; diff --git a/src/web/tracing.rs b/src/web/tracing.rs index 8d49c2d..1c660e4 100644 --- a/src/web/tracing.rs +++ b/src/web/tracing.rs @@ -64,6 +64,7 @@ impl Fairing for RequestIdHeader { /// A natural point of integration with Rocket is a fairing, which allows us to /// execute some code before and after each HTTP request, which is exactly what /// we need for determining the boundaries of a request span. +#[allow(dead_code)] pub struct RequestSpan; // TODO: Now that Rocket is using async internally, this is not guaranteed to