chore: listen to clippy
This commit is contained in:
parent
823133c034
commit
974ca80298
7 changed files with 13 additions and 29 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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(
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue