Skip to content

Commit

Permalink
chore(fmt): running cargo format
Browse files Browse the repository at this point in the history
  • Loading branch information
developerfred committed Nov 24, 2024
1 parent 20453a9 commit 0b8dde3
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ fn validate_url(url_str: &str) -> Result<Url, String> {
Url::parse(url_str).map_err(|_| "Invalid URL".to_string())
}

async fn render_html(url: &Url, _width: u32, _height: u32) -> Result<Vec<u8>, String> {
async fn render_html(url: &Url, _width: u32, _height: u32) -> Result<Vec<u8>, String> {
let html_content = reqwest::blocking::get(url.as_str())
.and_then(|response| response.text())
.map_err(|e| format!("Failed to fetch URL: {}", e))?;
Expand All @@ -36,8 +36,8 @@ async fn render_html(url: &Url, _width: u32, _height: u32) -> Result<Vec<u8>, St
base_url: Some(url.to_string()),
};

tokio::task::spawn_blocking(move || {
dioxus_native::launch_static_html_cfg(&html_content, config);
tokio::task::spawn_blocking(move || {
dioxus_native::launch_static_html_cfg(&html_content, config);
Ok(Vec::new())
})
.await
Expand Down Expand Up @@ -73,7 +73,7 @@ async fn health_check() -> impl IntoResponse {
}

#[tokio::main]
async fn main() {
async fn main() {
tracing_subscriber::fmt()
.with_target(false)
.with_level(true)
Expand Down Expand Up @@ -130,4 +130,4 @@ mod tests {
let response = health_check().await.into_response();
assert_eq!(response.status(), StatusCode::OK);
}
}
}

0 comments on commit 0b8dde3

Please sign in to comment.