mirror of
https://github.com/perstarkse/minne.git
synced 2026-04-22 08:48:30 +02:00
chore: clippy suggestions
This commit is contained in:
@@ -94,7 +94,7 @@ impl TemplateResponse {
|
||||
pub fn redirect(path: impl Into<String>) -> Self {
|
||||
Self {
|
||||
template_kind: TemplateKind::Redirect(path.into()),
|
||||
context: Value::from_serialize(&()),
|
||||
context: Value::from_serialize(()),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -38,13 +38,15 @@ macro_rules! create_asset_service {
|
||||
}};
|
||||
}
|
||||
|
||||
pub type MiddleWareVecType<S> = Vec<Box<dyn FnOnce(Router<S>) -> Router<S> + Send>>;
|
||||
|
||||
pub struct RouterFactory<S> {
|
||||
app_state: HtmlState,
|
||||
public_routers: Vec<Router<S>>,
|
||||
protected_routers: Vec<Router<S>>,
|
||||
nested_routes: Vec<(String, Router<S>)>,
|
||||
nested_protected_routes: Vec<(String, Router<S>)>,
|
||||
custom_middleware: Vec<Box<dyn FnOnce(Router<S>) -> Router<S> + Send>>,
|
||||
custom_middleware: MiddleWareVecType<S>,
|
||||
public_assets_config: Option<AssetsConfig>,
|
||||
}
|
||||
|
||||
|
||||
@@ -112,7 +112,7 @@ pub async fn show_change_password(
|
||||
) -> Result<impl IntoResponse, HtmlError> {
|
||||
Ok(TemplateResponse::new_template(
|
||||
"auth/change_password_form.html",
|
||||
{},
|
||||
(),
|
||||
))
|
||||
}
|
||||
|
||||
@@ -138,6 +138,6 @@ pub async fn change_password(
|
||||
Ok(TemplateResponse::new_partial(
|
||||
"auth/account_settings.html",
|
||||
"change_password_section",
|
||||
{},
|
||||
(),
|
||||
))
|
||||
}
|
||||
|
||||
@@ -31,9 +31,9 @@ pub async fn show_signin_form(
|
||||
true => Ok(TemplateResponse::new_partial(
|
||||
"auth/signin_form.html",
|
||||
"body",
|
||||
{},
|
||||
(),
|
||||
)),
|
||||
false => Ok(TemplateResponse::new_template("auth/signin_form.html", {})),
|
||||
false => Ok(TemplateResponse::new_template("auth/signin_form.html", ())),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -33,9 +33,9 @@ pub async fn show_signup_form(
|
||||
true => Ok(TemplateResponse::new_partial(
|
||||
"auth/signup_form.html",
|
||||
"body",
|
||||
{},
|
||||
(),
|
||||
)),
|
||||
false => Ok(TemplateResponse::new_template("auth/signup_form.html", {})),
|
||||
false => Ok(TemplateResponse::new_template("auth/signup_form.html", ())),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -92,7 +92,7 @@ pub async fn process_ingress_form(
|
||||
input
|
||||
.files
|
||||
.into_iter()
|
||||
.map(|file| FileInfo::new(file, &state.db, &user.id).map_err(|e| AppError::from(e))),
|
||||
.map(|file| FileInfo::new(file, &state.db, &user.id).map_err(AppError::from)),
|
||||
)
|
||||
.await?;
|
||||
|
||||
|
||||
@@ -85,7 +85,7 @@ pub async fn show_knowledge_page(
|
||||
let edge_trace = Scatter3D::new(edge_x, edge_y, edge_z)
|
||||
.mode(Mode::Lines)
|
||||
.line(Line::new().color("#888").width(2.0))
|
||||
.hover_template(&format!(
|
||||
.hover_template(format!(
|
||||
"Relationship: {}<br>",
|
||||
rel.metadata.relationship_type
|
||||
))
|
||||
|
||||
Reference in New Issue
Block a user