Skip to content

Commit 4fcd482

Browse files
committed
refactor: fix clippy lints
Signed-off-by: Ivin Joel Abraham <[email protected]>
1 parent 06d4d15 commit 4fcd482

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

src/commands/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ use crate::{
1010
};
1111

1212
/// Checks if the author has the Fourth Year or Third Year role. Can be used as an authorization procedure for other commands.
13+
#[allow(dead_code)]
1314
async fn is_privileged(ctx: &Context<'_>) -> bool {
1415
if let Some(guild_id) = ctx.guild_id() {
1516
if let Ok(member) = guild_id.member(ctx, ctx.author().id).await {

src/config.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ fn parse_owner_id_env(key: &str) -> Option<UserId> {
5656
.ok()
5757
.and_then(|s| {
5858
s.parse::<u64>()
59-
.map_err(|_| eprintln!("WARNING: Invalid OWNER_ID value '{}', ignoring.", s))
59+
.map_err(|_| eprintln!("WARNING: Invalid OWNER_ID value '{s}', ignoring."))
6060
.ok()
6161
})
6262
.map(UserId::new)
@@ -67,10 +67,7 @@ fn parse_bool_env(key: &str) -> bool {
6767
std::env::var(key)
6868
.map(|val| {
6969
val.parse().unwrap_or_else(|_| {
70-
eprintln!(
71-
"Warning: Invalid DEBUG value '{}', defaulting to false",
72-
val
73-
);
70+
eprintln!("Warning: Invalid DEBUG value '{val}', defaulting to false");
7471
false
7572
})
7673
})

src/graphql/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ impl GraphQLClient {
3333
pub fn new(root_url: String) -> Self {
3434
Self {
3535
http: Client::new(),
36-
root_url: Arc::new(root_url.into()),
36+
root_url: Arc::new(root_url),
3737
}
3838
}
3939

src/ids.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,9 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
1919
pub const ROLES_MESSAGE_ID: u64 = 1298636092886749294;
2020

2121
/// Fourth and Third Year Roles for privileged commands
22+
#[allow(dead_code)]
2223
pub const FOURTH_YEAR_ROLE_ID: u64 = 1135793659040772240;
24+
#[allow(dead_code)]
2325
pub const THIRD_YEAR_ROLE_ID: u64 = 1166292683317321738;
2426

2527
// Role IDs

0 commit comments

Comments
 (0)