refactor: replace qualified path with use

This commit is contained in:
Zynh Ludwig 2024-11-14 08:00:56 -08:00
parent 561ab77f65
commit 489c6ea8bf

View file

@ -7,6 +7,7 @@ use axum::{
}; };
use axum_extra::TypedHeader; use axum_extra::TypedHeader;
use tower_http::{services::ServeDir, trace::TraceLayer}; use tower_http::{services::ServeDir, trace::TraceLayer};
use views::askama::WelcomeTemplate;
use std::{io, net::SocketAddr}; use std::{io, net::SocketAddr};
@ -45,7 +46,7 @@ async fn main() -> io::Result<()> {
async fn welcome() -> impl IntoResponse { async fn welcome() -> impl IntoResponse {
let fact = views::get_cat_fact().await; let fact = views::get_cat_fact().await;
views::askama::WelcomeTemplate { fact } WelcomeTemplate { fact }
} }
async fn log_source( async fn log_source(