Skip to content

Commit

Permalink
chore: fix linting errors
Browse files Browse the repository at this point in the history
  • Loading branch information
corybuecker committed Dec 14, 2024
1 parent cc966c1 commit 09f3c8d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/authentication/login.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ pub async fn redirect(jar: SignedCookieJar) -> Result<(SignedCookieJar, Response
.secure(secure == *"true")
.build();

return Ok((
Ok((
jar.add(cookie),
Redirect::to(auth_url.as_str()).into_response(),
));
))
}
8 changes: 4 additions & 4 deletions src/utilities/tera.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use std::{collections::HashMap, time::SystemTime};
use tera::{Filter, Value};

pub fn extract_id() -> impl Filter {
return |value: &Value, _args: &HashMap<String, tera::Value>| -> tera::Result<tera::Value> {
|value: &Value, _args: &HashMap<String, tera::Value>| -> tera::Result<tera::Value> {
let id = value.get("_id");

match id {
Expand All @@ -11,7 +11,7 @@ pub fn extract_id() -> impl Filter {
id["$oid"].to_string().replace("\"", ""),
)),
}
};
}
}

pub fn digest_asset() -> impl tera::Function {
Expand All @@ -21,7 +21,7 @@ pub fn digest_asset() -> impl tera::Function {
.expect("could not generate asset timestamp");
let key = key.as_secs().to_string();

return move |args: &HashMap<String, tera::Value>| -> tera::Result<tera::Value> {
move |args: &HashMap<String, tera::Value>| -> tera::Result<tera::Value> {
match args.get("file") {
Some(file) => {
let mut path = "/assets/".to_string();
Expand All @@ -38,5 +38,5 @@ pub fn digest_asset() -> impl tera::Function {
}
None => Err("".to_string().into()),
}
};
}
}

0 comments on commit 09f3c8d

Please sign in to comment.