Skip to content

Commit cd5fef6

Browse files
authored
Merge pull request #561 from m-ou-se/clippy-sad
Make clippy happy.
2 parents 2d67967 + 17dde61 commit cd5fef6

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

rust_team_data/src/email_encryption.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ pub fn try_decrypt(key: &str, email: &str) -> Result<String, Error> {
5555
.decrypt(&nonce, encrypted)
5656
.map_err(|_| Error::EncryptionFailed)?,
5757
)
58-
.map_err(|_| Error::InvalidUTF8)
58+
.map_err(|_| Error::InvalidUtf8)
5959
}
6060

6161
fn init_cipher(key: &str) -> Result<XChaCha20Poly1305, Error> {
@@ -73,7 +73,7 @@ pub enum Error {
7373
EncryptionFailed,
7474
DecryptionFailed,
7575
WrongKeyLength,
76-
InvalidUTF8,
76+
InvalidUtf8,
7777
}
7878

7979
impl std::fmt::Display for Error {
@@ -83,7 +83,7 @@ impl std::fmt::Display for Error {
8383
Error::Hex(e) => write!(f, "{}", e),
8484
Error::EncryptionFailed => write!(f, "encryption failed"),
8585
Error::DecryptionFailed => write!(f, "encryption failed"),
86-
Error::InvalidUTF8 => write!(f, "invalid UTF-8"),
86+
Error::InvalidUtf8 => write!(f, "invalid UTF-8"),
8787
Error::WrongKeyLength => write!(f, "expected 32-bytes key"),
8888
}
8989
}

src/github.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ impl GitHubApi {
140140
ids: chunk.iter().map(|id| user_node_id(*id)).collect(),
141141
},
142142
)?;
143-
for node in res.nodes.into_iter().filter_map(|n| n) {
143+
for node in res.nodes.into_iter().flatten() {
144144
result.insert(node.database_id, node.login);
145145
}
146146
}

src/permissions.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,23 +5,23 @@ use std::collections::{HashMap, HashSet};
55

66
#[derive(serde_derive::Deserialize, Debug, Clone)]
77
#[serde(deny_unknown_fields)]
8-
pub(crate) struct BorsACL {
8+
pub(crate) struct BorsAcl {
99
#[serde(default)]
1010
review: bool,
1111
#[serde(rename = "try", default)]
1212
try_: bool,
1313
}
1414

15-
impl Default for BorsACL {
15+
impl Default for BorsAcl {
1616
fn default() -> Self {
17-
BorsACL {
17+
BorsAcl {
1818
review: false,
1919
try_: false,
2020
}
2121
}
2222
}
2323

24-
impl BorsACL {
24+
impl BorsAcl {
2525
pub(crate) fn review(&self) -> bool {
2626
self.review
2727
}
@@ -35,7 +35,7 @@ impl BorsACL {
3535
#[serde(rename_all = "kebab-case")]
3636
pub(crate) struct Permissions {
3737
#[serde(default)]
38-
bors: HashMap<String, BorsACL>,
38+
bors: HashMap<String, BorsAcl>,
3939
#[serde(default)]
4040
crates_io_ops_bot: HashMap<String, bool>,
4141
#[serde(flatten)]
@@ -53,7 +53,7 @@ impl Default for Permissions {
5353
}
5454

5555
impl Permissions {
56-
pub(crate) fn bors(&self) -> &HashMap<String, BorsACL> {
56+
pub(crate) fn bors(&self) -> &HashMap<String, BorsAcl> {
5757
&self.bors
5858
}
5959

0 commit comments

Comments
 (0)