Skip to content

Commit

Permalink
Fix new clippy lints
Browse files Browse the repository at this point in the history
  • Loading branch information
stephank committed Jul 23, 2024
1 parent 3d2a81f commit 2f27e0b
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/agents/store/rusqlite.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ pub struct RusqliteStore {
expire_cache: Duration,
/// Rate limit configuration.
limit_configs: Vec<LimitConfig>,
/// SQLite connection.
/// Database connection.
conn: Connection,
/// The agent used for fetching on cache miss.
fetcher: Addr<FetchAgent>,
Expand Down
2 changes: 1 addition & 1 deletion src/config/i18n.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ impl I18n {
let catalog = Catalog::parse(file).expect("could not parse catalog file");

// `Accept-Language` header uses IETF format.
let lang = lang.replace("_", "-");
let lang = lang.replace('_', "-");

(lang, catalog)
})
Expand Down
2 changes: 1 addition & 1 deletion src/config/templates.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ impl Template {
pub struct Templates {
/// Page displayed when the confirmation email was sent.
pub confirm_email: Template,
/// Page displayed when the login_hint is missing.
/// Page displayed when the `login_hint` is missing.
pub login_hint: Template,
/// HTML formatted email containing the one-type pad.
pub email_html: Template,
Expand Down
4 changes: 2 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
clippy::too_many_lines,
clippy::unused_async,
clippy::wildcard_imports,
// https://github.com/rust-lang/rust-clippy/issues/12279
clippy::no_effect_underscore_binding,
// https://github.com/rust-lang/rust-clippy/issues/12799
clippy::assigning_clones,
)]

#[macro_use]
Expand Down
2 changes: 1 addition & 1 deletion src/web.rs
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ impl Service {
_ => None,
};

for (idx, &(ref lang, _)) in app.i18n.catalogs.iter().enumerate() {
for (idx, (lang, _)) in app.i18n.catalogs.iter().enumerate() {
if lang == user_language {
catalog_idx = idx;
break 'lang;
Expand Down

0 comments on commit 2f27e0b

Please sign in to comment.