Skip to content

Commit

Permalink
Fix clippy warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
ViddeM committed Jun 22, 2024
1 parent 247d163 commit 17c8272
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion backend/src/handlers/auth.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ async fn gamma_callback(
}
};

if let Err(_) = session.insert("gamma_access_token", token) {
if session.insert("gamma_access_token", token).is_err() {
error!("[Gamma auth] Could not set gamma_acess_token key in cookie");
return HttpResponse::InternalServerError().finish();
}
Expand Down
3 changes: 1 addition & 2 deletions backend/src/repositories/user.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,7 @@ impl UserRepository {
.get_users()
.await?
.into_iter()
.filter(|user| user.cid.as_str() == cid)
.next()
.find(|user| user.cid.as_str() == cid)
.ok_or(HubbitError::NotFound)?;

let groups = self.gamma_client.get_groups_for_user(&user.id).await?;
Expand Down
2 changes: 1 addition & 1 deletion backend/src/schema/device.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use log::error;
use uuid::Uuid;

use crate::{
models::{AuthorizedUser, GammaUser},
models::AuthorizedUser,
repositories::{
device::{CreateDevice, DeviceRepository, UpdateDevice},
session::SessionRepository,
Expand Down
2 changes: 1 addition & 1 deletion backend/src/schema/user.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use serde::{Deserialize, Serialize};
use uuid::Uuid;

use crate::{
models::{AuthorizedUser, GammaGroupType, GammaUser, UserSession},
models::{AuthorizedUser, GammaGroupType, UserSession},
repositories::{device::DeviceRepository, user_session::UserSessionRepository},
services::{hour_stats::HourStatsService, user::UserService},
utils::{MAX_DATETIME, MIN_DATETIME},
Expand Down
5 changes: 3 additions & 2 deletions frontend/src/components/stats-table/StatsTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ import {
StatsTableStatFragment,
} from '../../__generated__/graphql';
import { formatNick } from '../../util';

import styles from './StatsTable.module.scss';
import styles from "./StatsTable.module.scss";
import Image from 'next/image';

interface Props {
Expand Down Expand Up @@ -85,6 +84,8 @@ const StatsTable = ({ stats, me, hideChange = false, currentActive }: Props) =>
src={getChangeImageName(stat.currentPosition, stat.prevPosition)}
alt="position change icon"
className={styles.changeIcon}
width={16}
height={16}
/>
</td>
)}
Expand Down

0 comments on commit 17c8272

Please sign in to comment.