Skip to content

Commit

Permalink
deps(germ): bump to 0.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Fuwn committed Apr 4, 2024
1 parent b974375 commit 4d2c45b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ opt-level = 3

[dependencies]
# Gemini
germ = { version = "0.3.10", features = ["ast", "meta"] }
germ = { version = "0.4.0", features = ["ast", "meta"] }

# HTTP
actix-web = "4.0.1"
Expand Down
8 changes: 5 additions & 3 deletions src/response.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ For example: to proxy "gemini://fuwn.me/uptime", visit "/proxy/fuwn.me/uptime".<
};
// Make a request to get Gemini content and time it.
let mut timer = Instant::now();
let mut response = match germ::request::request(&url) {
let mut response = match germ::request::request(&url).await {
Ok(response) => response,
Err(e) => {
return Ok(HttpResponse::Ok().body(e.to_string()));
Expand All @@ -91,7 +91,9 @@ For example: to proxy "gemini://fuwn.me/uptime", visit "/proxy/fuwn.me/uptime".<
.body(format!("{e}")),
);
}
}) {
})
.await
{
Ok(response) => response,
Err(e) => {
return Ok(HttpResponse::Ok().body(e.to_string()));
Expand Down Expand Up @@ -234,7 +236,7 @@ For example: to proxy "gemini://fuwn.me/uptime", visit "/proxy/fuwn.me/uptime".<

html_context.push_str(
&crate::html::from_gemini(
&match germ::request::request(&redirect_url) {
&match germ::request::request(&redirect_url).await {
Ok(response) => response,
Err(e) => {
return Ok(HttpResponse::Ok().body(e.to_string()));
Expand Down

0 comments on commit 4d2c45b

Please sign in to comment.