chore: listen to clippy

This commit is contained in:
Jef Roosens 2025-03-31 20:13:18 +02:00
parent 823133c034
commit 974ca80298
No known key found for this signature in database
GPG key ID: 21FD3D77D56BAF49
7 changed files with 13 additions and 29 deletions

View file

@ -20,7 +20,7 @@ impl Command {
match self {
Self::Sync { username, devices } => {
let user = store.get_user(&username).unwrap();
let user = store.get_user(username).unwrap();
store
.update_device_sync_status(
&user,
@ -30,7 +30,7 @@ impl Command {
.unwrap();
}
Self::Devices { username } => {
let user = store.get_user(&username).unwrap();
let user = store.get_user(username).unwrap();
let devices = store.devices_for_user(&user).unwrap();
for device in devices {

View file

@ -24,7 +24,10 @@ pub fn router(ctx: Context) -> Router<Context> {
"/{username}",
post(post_episode_actions).get(get_episode_actions),
)
.layer(middleware::from_fn_with_state(ctx.clone(), auth_api_middleware))
.layer(middleware::from_fn_with_state(
ctx.clone(),
auth_api_middleware,
))
}
async fn post_episode_actions(
@ -84,10 +87,7 @@ async fn get_episode_actions(
return Err(AppError::BadRequest);
}
let since = filter
.since
.map(|ts| DateTime::from_timestamp(ts, 0))
.flatten();
let since = filter.since.and_then(|ts| DateTime::from_timestamp(ts, 0));
Ok(tokio::task::spawn_blocking(move || {
ctx.store.episode_actions_for_user(

View file

@ -47,7 +47,7 @@ pub struct TemplateResponse<T> {
impl<T> TemplateResponse<T> {
pub fn new(tera: &Arc<tera::Tera>, template: T) -> Self {
Self {
tera: Arc::clone(&tera),
tera: Arc::clone(tera),
template,
}
}