Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit b9029bf

Browse filesBrowse files
committed
chore: forbid clippy allow attributes
1 parent 5e00485 commit b9029bf
Copy full SHA for b9029bf

File tree

Expand file treeCollapse file tree

53 files changed

+68
-76
lines changed
Filter options

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Dismiss banner
Expand file treeCollapse file tree

53 files changed

+68
-76
lines changed

‎Cargo.lock

Copy file name to clipboardExpand all lines: Cargo.lock
+12-12Lines changed: 12 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎Cargo.toml

Copy file name to clipboardExpand all lines: Cargo.toml
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ reqwest-retry = "0.6.1"
5252
reqwest-tracing = "0.5.3"
5353
semver = "1.0.23"
5454
serde = "1.0.207"
55-
serde_json = "1.0.124"
55+
serde_json = "1.0.128"
5656
sha1 = "0.10.6"
5757
sha2 = "0.10.8"
5858
sqlx = { version = "0.8.2", default-features = false, features = ["postgres"] }

‎examples/archive_async/src/main.rs

Copy file name to clipboardExpand all lines: examples/archive_async/src/main.rs
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#![forbid(unsafe_code)]
2+
#![forbid(clippy::allow_attributes)]
23
#![deny(clippy::pedantic)]
34

45
use postgresql_archive::configuration::theseus;

‎examples/archive_sync/src/main.rs

Copy file name to clipboardExpand all lines: examples/archive_sync/src/main.rs
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#![forbid(unsafe_code)]
2+
#![forbid(clippy::allow_attributes)]
23
#![deny(clippy::pedantic)]
34

45
use postgresql_archive::blocking::{extract, get_archive};

‎examples/axum_embedded/src/main.rs

Copy file name to clipboardExpand all lines: examples/axum_embedded/src/main.rs
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#![forbid(unsafe_code)]
2+
#![forbid(clippy::allow_attributes)]
23
#![deny(clippy::pedantic)]
34

45
use anyhow::Result;

‎examples/diesel_embedded/src/main.rs

Copy file name to clipboardExpand all lines: examples/diesel_embedded/src/main.rs
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#![forbid(unsafe_code)]
2+
#![forbid(clippy::allow_attributes)]
23
#![deny(clippy::pedantic)]
34

45
use diesel::r2d2::{ConnectionManager, Pool};

‎examples/download_progress_bar/src/main.rs

Copy file name to clipboardExpand all lines: examples/download_progress_bar/src/main.rs
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#![forbid(unsafe_code)]
2+
#![forbid(clippy::allow_attributes)]
23
#![deny(clippy::pedantic)]
34

45
use anyhow::Result;

‎examples/embedded_async/src/main.rs

Copy file name to clipboardExpand all lines: examples/embedded_async/src/main.rs
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#![forbid(unsafe_code)]
2+
#![forbid(clippy::allow_attributes)]
23
#![deny(clippy::pedantic)]
34

45
use postgresql_embedded::{PostgreSQL, Result, Settings, VersionReq};

‎examples/embedded_sync/src/main.rs

Copy file name to clipboardExpand all lines: examples/embedded_sync/src/main.rs
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#![forbid(unsafe_code)]
2+
#![forbid(clippy::allow_attributes)]
23
#![deny(clippy::pedantic)]
34

45
use postgresql_embedded::blocking::PostgreSQL;

‎examples/portal_corp_extension/src/main.rs

Copy file name to clipboardExpand all lines: examples/portal_corp_extension/src/main.rs
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#![forbid(unsafe_code)]
2+
#![forbid(clippy::allow_attributes)]
23
#![deny(clippy::pedantic)]
34

45
use anyhow::Result;

‎examples/postgres_embedded/src/main.rs

Copy file name to clipboardExpand all lines: examples/postgres_embedded/src/main.rs
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#![forbid(unsafe_code)]
2+
#![forbid(clippy::allow_attributes)]
23
#![deny(clippy::pedantic)]
34

45
use anyhow::Result;

‎examples/sqlx_embedded/src/main.rs

Copy file name to clipboardExpand all lines: examples/sqlx_embedded/src/main.rs
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#![forbid(unsafe_code)]
2+
#![forbid(clippy::allow_attributes)]
23
#![deny(clippy::pedantic)]
34

45
use anyhow::Result;

‎examples/tensor_chord_extension/src/main.rs

Copy file name to clipboardExpand all lines: examples/tensor_chord_extension/src/main.rs
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#![forbid(unsafe_code)]
2+
#![forbid(clippy::allow_attributes)]
23
#![deny(clippy::pedantic)]
34

45
use anyhow::Result;

‎examples/zonky/src/main.rs

Copy file name to clipboardExpand all lines: examples/zonky/src/main.rs
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#![forbid(unsafe_code)]
2+
#![forbid(clippy::allow_attributes)]
23
#![deny(clippy::pedantic)]
34

45
use postgresql_archive::configuration::zonky;

‎postgresql_archive/src/archive.rs

Copy file name to clipboardExpand all lines: postgresql_archive/src/archive.rs
-1Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ pub async fn get_archive(url: &str, version_req: &VersionReq) -> Result<(Version
4040
///
4141
/// # Errors
4242
/// Returns an error if the extraction fails.
43-
#[allow(clippy::cast_precision_loss)]
4443
#[instrument(skip(bytes))]
4544
pub async fn extract(url: &str, bytes: &Vec<u8>, out_dir: &Path) -> Result<Vec<PathBuf>> {
4645
let extractor_fn = extractor::registry::get(url)?;

‎postgresql_archive/src/blocking/archive.rs

Copy file name to clipboardExpand all lines: postgresql_archive/src/blocking/archive.rs
+3-1Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@ pub fn get_version(url: &str, version_req: &VersionReq) -> crate::Result<Version
1717
}
1818

1919
/// Gets the archive for a given [version requirement](VersionReq) that passes the default
20-
/// matcher. If no archive is found for the [version requirement](VersionReq) and matcher then
20+
/// matcher.
21+
///
22+
/// If no archive is found for the [version requirement](VersionReq) and matcher then
2123
/// an [error](crate::error::Error) is returned.
2224
///
2325
/// # Errors

‎postgresql_archive/src/configuration/theseus/extractor.rs

Copy file name to clipboardExpand all lines: postgresql_archive/src/configuration/theseus/extractor.rs
-1Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ use tracing::{debug, instrument, warn};
1212
///
1313
/// # Errors
1414
/// Returns an error if the extraction fails.
15-
#[allow(clippy::cast_precision_loss)]
1615
#[instrument(skip(bytes))]
1716
pub fn extract(bytes: &Vec<u8>, extract_directories: ExtractDirectories) -> Result<Vec<PathBuf>> {
1817
let out_dir = extract_directories.get_path(".")?;

‎postgresql_archive/src/configuration/theseus/matcher.rs

Copy file name to clipboardExpand all lines: postgresql_archive/src/configuration/theseus/matcher.rs
-1Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ use semver::Version;
44
///
55
/// # Errors
66
/// * If the asset matcher fails.
7-
#[allow(clippy::unnecessary_wraps)]
87
pub fn matcher(_url: &str, name: &str, version: &Version) -> crate::Result<bool> {
98
let target = target_triple::TARGET;
109
let expected_name = format!("postgresql-{version}-{target}.tar.gz");

‎postgresql_archive/src/configuration/zonky/extractor.rs

Copy file name to clipboardExpand all lines: postgresql_archive/src/configuration/zonky/extractor.rs
+1-2Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,7 @@ use zip::ZipArchive;
1414
///
1515
/// # Errors
1616
/// Returns an error if the extraction fails.
17-
#[allow(clippy::case_sensitive_file_extension_comparisons)]
18-
#[allow(clippy::cast_precision_loss)]
17+
#[expect(clippy::case_sensitive_file_extension_comparisons)]
1918
#[instrument(skip(bytes))]
2019
pub fn extract(bytes: &Vec<u8>, extract_directories: ExtractDirectories) -> Result<Vec<PathBuf>> {
2120
let out_dir = extract_directories.get_path(".")?;

‎postgresql_archive/src/configuration/zonky/matcher.rs

Copy file name to clipboardExpand all lines: postgresql_archive/src/configuration/zonky/matcher.rs
-1Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ use std::env;
66
///
77
/// # Errors
88
/// * If the asset matcher fails.
9-
#[allow(clippy::unnecessary_wraps)]
109
pub fn matcher(_url: &str, name: &str, version: &Version) -> Result<bool> {
1110
let os = get_os();
1211
let arch = get_arch();

‎postgresql_archive/src/configuration/zonky/repository.rs

Copy file name to clipboardExpand all lines: postgresql_archive/src/configuration/zonky/repository.rs
+1-2Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ impl Zonky {
2424
///
2525
/// # Errors
2626
/// * If the URL is invalid.
27-
#[allow(clippy::new_ret_no_self)]
27+
#[expect(clippy::new_ret_no_self)]
2828
pub fn new(_url: &str) -> Result<Box<dyn Repository>> {
2929
let os = get_os();
3030
let arch = get_arch();
@@ -48,7 +48,6 @@ impl Repository for Zonky {
4848
}
4949

5050
#[instrument]
51-
#[allow(clippy::cast_precision_loss)]
5251
async fn get_archive(&self, version_req: &VersionReq) -> Result<Archive> {
5352
self.maven.get_archive(version_req).await
5453
}

‎postgresql_archive/src/extractor/registry.rs

Copy file name to clipboardExpand all lines: postgresql_archive/src/extractor/registry.rs
+1-3Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ type SupportsFn = fn(&str) -> Result<bool>;
1515
type ExtractFn = fn(&Vec<u8>, ExtractDirectories) -> Result<Vec<PathBuf>>;
1616

1717
/// Singleton struct to store extractors
18-
#[allow(clippy::type_complexity)]
18+
#[expect(clippy::type_complexity)]
1919
struct RepositoryRegistry {
2020
extractors: Vec<(Arc<RwLock<SupportsFn>>, Arc<RwLock<ExtractFn>>)>,
2121
}
@@ -63,7 +63,6 @@ impl RepositoryRegistry {
6363
impl Default for RepositoryRegistry {
6464
/// Creates a new repository registry with the default repositories registered.
6565
fn default() -> Self {
66-
#[allow(unused_mut)]
6766
let mut registry = Self::new();
6867
#[cfg(feature = "theseus")]
6968
registry.register(|url| Ok(url.starts_with(theseus::URL)), theseus::extract);
@@ -77,7 +76,6 @@ impl Default for RepositoryRegistry {
7776
///
7877
/// # Errors
7978
/// * If the registry is poisoned.
80-
#[allow(dead_code)]
8179
pub fn register(supports_fn: SupportsFn, extractor_fn: ExtractFn) -> Result<()> {
8280
let mut registry = REGISTRY
8381
.lock()

‎postgresql_archive/src/extractor/tar_gz_extractor.rs

Copy file name to clipboardExpand all lines: postgresql_archive/src/extractor/tar_gz_extractor.rs
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ use tracing::{debug, instrument, warn};
1414
///
1515
/// # Errors
1616
/// Returns an error if the extraction fails.
17-
#[allow(clippy::cast_precision_loss)]
17+
#[expect(clippy::cast_precision_loss)]
1818
#[instrument(skip(bytes))]
1919
pub fn extract(bytes: &Vec<u8>, extract_directories: ExtractDirectories) -> Result<Vec<PathBuf>> {
2020
let mut files = Vec::new();

‎postgresql_archive/src/extractor/tar_xz_extractor.rs

Copy file name to clipboardExpand all lines: postgresql_archive/src/extractor/tar_xz_extractor.rs
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ use tracing::{debug, instrument, warn};
1414
///
1515
/// # Errors
1616
/// Returns an error if the extraction fails.
17-
#[allow(clippy::cast_precision_loss)]
17+
#[expect(clippy::cast_precision_loss)]
1818
#[instrument(skip(bytes))]
1919
pub fn extract(bytes: &Vec<u8>, extract_directories: ExtractDirectories) -> Result<Vec<PathBuf>> {
2020
let mut files = Vec::new();

‎postgresql_archive/src/extractor/zip_extractor.rs

Copy file name to clipboardExpand all lines: postgresql_archive/src/extractor/zip_extractor.rs
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ use zip::ZipArchive;
1313
///
1414
/// # Errors
1515
/// Returns an error if the extraction fails.
16-
#[allow(clippy::cast_precision_loss)]
16+
#[expect(clippy::cast_precision_loss)]
1717
#[instrument(skip(bytes))]
1818
pub fn extract(bytes: &Vec<u8>, extract_directories: ExtractDirectories) -> Result<Vec<PathBuf>> {
1919
let mut files = Vec::new();

‎postgresql_archive/src/hasher/registry.rs

Copy file name to clipboardExpand all lines: postgresql_archive/src/hasher/registry.rs
+1-4Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ use crate::hasher::md5;
66
use crate::hasher::sha1;
77
#[cfg(feature = "sha2")]
88
use crate::hasher::sha2_256;
9-
#[allow(unused_imports)]
109
#[cfg(feature = "sha2")]
1110
use crate::hasher::sha2_512;
1211
#[cfg(feature = "maven")]
@@ -22,7 +21,7 @@ pub type SupportsFn = fn(&str, &str) -> Result<bool>;
2221
pub type HasherFn = fn(&Vec<u8>) -> Result<String>;
2322

2423
/// Singleton struct to store hashers
25-
#[allow(clippy::type_complexity)]
24+
#[expect(clippy::type_complexity)]
2625
struct HasherRegistry {
2726
hashers: Vec<(Arc<RwLock<SupportsFn>>, Arc<RwLock<HasherFn>>)>,
2827
}
@@ -73,7 +72,6 @@ impl HasherRegistry {
7372
impl Default for HasherRegistry {
7473
/// Creates a new hasher registry with the default hashers registered.
7574
fn default() -> Self {
76-
#[allow(unused_mut)]
7775
let mut registry = Self::new();
7876
#[cfg(feature = "theseus")]
7977
registry.register(
@@ -110,7 +108,6 @@ impl Default for HasherRegistry {
110108
///
111109
/// # Errors
112110
/// * If the registry is poisoned.
113-
#[allow(dead_code)]
114111
pub fn register(supports_fn: SupportsFn, hasher_fn: HasherFn) -> Result<()> {
115112
let mut registry = REGISTRY
116113
.lock()

‎postgresql_archive/src/lib.rs

Copy file name to clipboardExpand all lines: postgresql_archive/src/lib.rs
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@
110110
//! PostgreSQL is covered under [The PostgreSQL License](https://opensource.org/licenses/postgresql).
111111
112112
#![forbid(unsafe_code)]
113+
#![forbid(clippy::allow_attributes)]
113114
#![deny(clippy::pedantic)]
114115
#![allow(clippy::doc_markdown)]
115116
#![allow(clippy::module_name_repetitions)]

‎postgresql_archive/src/matcher/registry.rs

Copy file name to clipboardExpand all lines: postgresql_archive/src/matcher/registry.rs
+1-3Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ pub type SupportsFn = fn(&str) -> Result<bool>;
1414
pub type MatcherFn = fn(&str, &str, &Version) -> Result<bool>;
1515

1616
/// Singleton struct to store matchers
17-
#[allow(clippy::type_complexity)]
17+
#[expect(clippy::type_complexity)]
1818
struct MatchersRegistry {
1919
matchers: Vec<(Arc<RwLock<SupportsFn>>, Arc<RwLock<MatcherFn>>)>,
2020
}
@@ -64,7 +64,6 @@ impl MatchersRegistry {
6464
impl Default for MatchersRegistry {
6565
/// Creates a new matcher registry with the default matchers registered.
6666
fn default() -> Self {
67-
#[allow(unused_mut)]
6867
let mut registry = Self::new();
6968
#[cfg(feature = "theseus")]
7069
registry.register(|url| Ok(url == theseus::URL), theseus::matcher);
@@ -79,7 +78,6 @@ impl Default for MatchersRegistry {
7978
///
8079
/// # Errors
8180
/// * If the registry is poisoned.
82-
#[allow(dead_code)]
8381
pub fn register(supports_fn: SupportsFn, matcher_fn: MatcherFn) -> Result<()> {
8482
let mut registry = REGISTRY
8583
.lock()

‎postgresql_archive/src/repository/github/repository.rs

Copy file name to clipboardExpand all lines: postgresql_archive/src/repository/github/repository.rs
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ impl GitHub {
6262
///
6363
/// # Errors
6464
/// * If the URL is invalid.
65-
#[allow(clippy::new_ret_no_self)]
65+
#[expect(clippy::new_ret_no_self)]
6666
pub fn new(url: &str) -> Result<Box<dyn Repository>> {
6767
let parsed_url = Url::parse(url)?;
6868
let path = parsed_url.path().trim_start_matches('/');
@@ -216,7 +216,7 @@ impl Repository for GitHub {
216216
}
217217

218218
#[instrument]
219-
#[allow(clippy::cast_precision_loss)]
219+
#[expect(clippy::cast_precision_loss)]
220220
async fn get_archive(&self, version_req: &VersionReq) -> Result<Archive> {
221221
let release = self.get_release(version_req).await?;
222222
let version = Self::get_version_from_tag_name(release.tag_name.as_str())?;
@@ -283,7 +283,7 @@ impl Repository for GitHub {
283283
struct GithubMiddleware;
284284

285285
impl GithubMiddleware {
286-
#[allow(clippy::unnecessary_wraps)]
286+
#[expect(clippy::unnecessary_wraps)]
287287
fn add_headers(request: &mut Request) -> Result<()> {
288288
let headers = request.headers_mut();
289289
headers.append(

‎postgresql_archive/src/repository/maven/repository.rs

Copy file name to clipboardExpand all lines: postgresql_archive/src/repository/maven/repository.rs
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ impl Maven {
4242
///
4343
/// # Errors
4444
/// * If the URL is invalid.
45-
#[allow(clippy::new_ret_no_self)]
45+
#[expect(clippy::new_ret_no_self)]
4646
pub fn new(url: &str) -> Result<Box<dyn Repository>> {
4747
Ok(Box::new(Self {
4848
url: url.to_string(),
@@ -103,7 +103,7 @@ impl Repository for Maven {
103103
}
104104

105105
#[instrument]
106-
#[allow(clippy::cast_precision_loss)]
106+
#[expect(clippy::cast_precision_loss)]
107107
async fn get_archive(&self, version_req: &VersionReq) -> Result<Archive> {
108108
let (artifact, version) = self.get_artifact(version_req).await?;
109109
let archive_name = format!("{artifact}-{version}.jar");
@@ -166,7 +166,7 @@ impl Repository for Maven {
166166
struct MavenMiddleware;
167167

168168
impl MavenMiddleware {
169-
#[allow(clippy::unnecessary_wraps)]
169+
#[expect(clippy::unnecessary_wraps)]
170170
fn add_headers(request: &mut Request) -> Result<()> {
171171
let headers = request.headers_mut();
172172
headers.append(header::USER_AGENT, USER_AGENT.parse().unwrap());

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.