Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix new clippy errors & formatting errors #2197

Merged
merged 1 commit into from
Aug 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion crates/font-awesome-as-a-crate/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ fn write_fontawesome_sprite() {
dest_file
.write_all(
format!(
r####"(b"{dirname}",b"{filename}")=>r###"{data}"###,"####,
r####"(b"{dirname}",b"{filename}")=>r#"{data}"#,"####,
data = data,
dirname = dirname,
filename = filename.replace(".svg", ""),
Expand Down
12 changes: 10 additions & 2 deletions src/cdn.rs
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,11 @@ impl CdnBackend {
invalidation_id: &str,
path_patterns: &[&str],
) {
let CdnBackend::Dummy { ref invalidation_requests, .. } = self else {
let CdnBackend::Dummy {
ref invalidation_requests,
..
} = self
else {
panic!("invalid CDN backend");
};

Expand Down Expand Up @@ -559,7 +563,11 @@ mod tests {
use aws_smithy_http::body::SdkBody;

fn active_invalidations(cdn: &CdnBackend, distribution_id: &str) -> Vec<CdnInvalidation> {
let CdnBackend::Dummy {ref invalidation_requests, .. } = cdn else {
let CdnBackend::Dummy {
ref invalidation_requests,
..
} = cdn
else {
panic!("invalid CDN backend");
};

Expand Down
2 changes: 2 additions & 0 deletions src/db/migrate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ macro_rules! migration {
self.description()
);

#[allow(clippy::redundant_closure_call)]
$up_func(transaction)
}
fn down(&self, transaction: &mut Transaction) -> Result<(), PostgresError> {
Expand All @@ -56,6 +57,7 @@ macro_rules! migration {
self.version(),
self.description()
);
#[allow(clippy::redundant_closure_call)]
$down_func(transaction)
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/utils/consistency/diff.rs
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ mod tests {
}];

assert_eq!(
calculate_diff(db_releases.iter(), vec![].iter()),
calculate_diff(db_releases.iter(), [].iter()),
vec![Difference::CrateNotInIndex("krate".into())]
);
}
Expand All @@ -142,7 +142,7 @@ mod tests {
}];

assert_eq!(
calculate_diff(vec![].iter(), index_releases.iter()),
calculate_diff([].iter(), index_releases.iter()),
vec![Difference::CrateNotInDb(
"krate".into(),
vec!["0.0.2".into(), "0.0.3".into()]
Expand Down
Loading