diff --git a/.github/workflows/check-radicle-httpd.yml b/.github/workflows/check-radicle-httpd.yml index 0593094ff..ea615fda3 100644 --- a/.github/workflows/check-radicle-httpd.yml +++ b/.github/workflows/check-radicle-httpd.yml @@ -12,7 +12,7 @@ jobs: working-directory: ./radicle-httpd steps: - uses: actions/checkout@v4 - - uses: dtolnay/rust-toolchain@stable + - uses: dtolnay/rust-toolchain@1.87 - uses: Swatinem/rust-cache@v2 with: workspaces: radicle-httpd -> target @@ -30,7 +30,7 @@ jobs: working-directory: ./radicle-httpd steps: - uses: actions/checkout@v4 - - uses: dtolnay/rust-toolchain@stable + - uses: dtolnay/rust-toolchain@1.87 - uses: Swatinem/rust-cache@v2 with: workspaces: radicle-httpd -> target @@ -46,7 +46,9 @@ jobs: working-directory: ./radicle-httpd steps: - uses: actions/checkout@v4 - - uses: dtolnay/rust-toolchain@stable + - uses: dtolnay/rust-toolchain@1.87 + with: + components: rustfmt, clippy - uses: Swatinem/rust-cache@v2 with: workspaces: radicle-httpd -> target diff --git a/radicle-httpd/rust-toolchain b/radicle-httpd/rust-toolchain index 5e49e6ba1..8a2b13383 100644 --- a/radicle-httpd/rust-toolchain +++ b/radicle-httpd/rust-toolchain @@ -1 +1 @@ -1.83 \ No newline at end of file +1.87 diff --git a/radicle-httpd/src/api.rs b/radicle-httpd/src/api.rs index 1aa2d889e..6bb138d91 100644 --- a/radicle-httpd/src/api.rs +++ b/radicle-httpd/src/api.rs @@ -42,6 +42,7 @@ impl Context { } } + #[allow(clippy::result_large_err)] pub fn repo_info( &self, repo: &R, @@ -98,6 +99,7 @@ impl Context { } /// Get a repository by RID, checking to make sure we're allowed to view it. + #[allow(clippy::result_large_err)] pub fn repo(&self, rid: RepoId) -> Result<(Repository, DocAt), error::Error> { let repo = self.profile.storage.repository(rid)?; let doc = repo.identity_doc()?; diff --git a/radicle-httpd/src/lib.rs b/radicle-httpd/src/lib.rs index b05a072e0..9fdbba6be 100644 --- a/radicle-httpd/src/lib.rs +++ b/radicle-httpd/src/lib.rs @@ -42,7 +42,7 @@ mod test; mod tracing_extra; /// Default cache HTTP size. -pub const DEFAULT_CACHE_SIZE: NonZeroUsize = unsafe { NonZeroUsize::new_unchecked(100) }; +pub const DEFAULT_CACHE_SIZE: NonZeroUsize = NonZeroUsize::new(100).unwrap(); #[derive(Debug, Clone)] pub struct Options {