Skip to content

Commit 378a8e5

Browse files
committed
Fix clippy lint errors
The drawback of using rust-nightly is that time to time new linter rules are added that render master essentially broken from CI point of view. This patch fixes existing lint errors.
1 parent c7bae9f commit 378a8e5

File tree

3 files changed

+5
-7
lines changed

3 files changed

+5
-7
lines changed

.github/workflows/tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ jobs:
106106
- uses: actions-rs/cargo@v1
107107
with:
108108
command: rustdoc
109-
args: -- -D intra-doc-link-resolution-failure
109+
args: -- -D rustdoc::broken_intra_doc_links
110110

111111
tests:
112112
runs-on: ubuntu-latest

src/storage/sql/models.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -96,10 +96,8 @@ pub fn combine_rows(
9696
snippet,
9797
changesets_by_snippet_id
9898
.remove(&snippet_id)
99-
.unwrap_or_else(Vec::new),
100-
tags_by_snippet_id
101-
.remove(&snippet_id)
102-
.unwrap_or_else(Vec::new),
99+
.unwrap_or_default(),
100+
tags_by_snippet_id.remove(&snippet_id).unwrap_or_default(),
103101
))
104102
})
105103
.collect()

src/web/auth.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,15 @@ use serde::Deserialize;
99

1010
pub use jwt::JwtValidator;
1111

12-
#[derive(Debug, PartialEq, Deserialize)]
12+
#[derive(Debug, PartialEq, Eq, Deserialize)]
1313
pub enum Permission {
1414
/// Allows users to import snippets (i.e. to create new snippets and set
1515
/// the values of some protected Snippet fields like `id` or `created_at`).
1616
#[serde(rename(deserialize = "import"))]
1717
Import,
1818
}
1919

20-
#[derive(Debug, PartialEq)]
20+
#[derive(Debug, PartialEq, Eq)]
2121
pub enum User {
2222
/// Authenticated user. Can create, retrieve, update, and delete private
2323
/// snippets. May have additional permissions.

0 commit comments

Comments
 (0)