Skip to content
This repository was archived by the owner on Oct 10, 2025. It is now read-only.

Commit 51bcebd

Browse files
committed
Fix clippy warnings
1 parent 6b07d7e commit 51bcebd

3 files changed

Lines changed: 12 additions & 12 deletions

File tree

src/auth.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,9 @@ async fn login(state: &State<SharedQxState>) -> Redirect {
8585
(s.app_config.is_local_server(), s.app_config.server_port)
8686
};
8787
if is_local_server {
88-
Redirect::to(format!("http://localhost:{}/login/google", server_port))
88+
Redirect::to(format!("http://localhost:{server_port}/login/google"))
8989
} else {
90-
Redirect::to(format!("https://qxqx.org:{}/login/google", server_port))
90+
Redirect::to(format!("https://qxqx.org:{server_port}/login/google"))
9191
}
9292
}
9393

src/changes.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ impl ChangeStatus {
4444
PENDING => Self::Pending,
4545
ACCEPTED => Self::Accepted,
4646
REJECTED => Self::Rejected,
47-
_ => panic!("Unknown status: {}", s),
47+
_ => panic!("Unknown status: {s}"),
4848
}
4949
}
5050
}
@@ -83,7 +83,7 @@ impl DataType {
8383
RUN_UPDATED => Self::RunUpdated,
8484
RADIO_PUNCH => Self::RadioPunch,
8585
CARD_READOUT => Self::CardReadout,
86-
_ => panic!("Unknown data type: {}", s),
86+
_ => panic!("Unknown data type: {s}"),
8787
}
8888
}
8989
}
@@ -93,11 +93,11 @@ impl_sqlx_text_type_encode_decode!(DataType);
9393
impl Display for DataType {
9494
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
9595
match self {
96-
DataType::OcChange => write!(f, "{}", OC_CHANGE),
97-
DataType::RunUpdateRequest => write!(f, "{}", RUN_UPDATE_REQUEST),
98-
DataType::RunUpdated => write!(f, "{}", RUN_UPDATED),
99-
DataType::RadioPunch => write!(f, "{}", RADIO_PUNCH),
100-
DataType::CardReadout => write!(f, "{}", CARD_READOUT),
96+
DataType::OcChange => write!(f, "{OC_CHANGE}"),
97+
DataType::RunUpdateRequest => write!(f, "{RUN_UPDATE_REQUEST}"),
98+
DataType::RunUpdated => write!(f, "{RUN_UPDATED}"),
99+
DataType::RadioPunch => write!(f, "{RADIO_PUNCH}"),
100+
DataType::CardReadout => write!(f, "{CARD_READOUT}"),
101101
}
102102
}
103103
}

src/util.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,15 +40,15 @@ pub(crate) mod test {
4040

4141
pub(crate) fn string_to_custom_error(err: &str) -> Custom<String> {
4242
error!("Error: {err}\nbacktrace: {}", Backtrace::capture());
43-
Custom(Status::InternalServerError, format!("Error: {}", err))
43+
Custom(Status::InternalServerError, format!("Error: {err}"))
4444
}
4545
pub(crate) fn sqlx_to_custom_error(err: sqlx::Error) -> Custom<String> {
4646
error!("SQL Error: {err}\nbacktrace: {}", Backtrace::capture());
47-
Custom(Status::InternalServerError, format!("SQLx error: {}", err))
47+
Custom(Status::InternalServerError, format!("SQLx error: {err}"))
4848
}
4949
pub(crate) fn anyhow_to_custom_error(err: anyhow::Error) -> Custom<String> {
5050
error!("Error: {err}\nbacktrace: {}", Backtrace::capture());
51-
Custom(Status::InternalServerError, format!("Error: {}", err))
51+
Custom(Status::InternalServerError, format!("Error: {err}"))
5252
}
5353
pub(crate) fn sqlx_to_anyhow(err: sqlx::Error) -> anyhow::Error {
5454
error!("SQL Error: {err}\nbacktrace: {}", Backtrace::capture());

0 commit comments

Comments
 (0)