Skip to content

Commit

Permalink
fix comment, bump minor
Browse files Browse the repository at this point in the history
  • Loading branch information
ckcr4lyf committed Jul 20, 2022
1 parent af74759 commit abbd564
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "kiryuu"
version = "0.1.0"
version = "0.1.1"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
Expand Down
4 changes: 2 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@ async fn announce(req: HttpRequest, data: web::Data<AppState>) -> HttpResponse {
let conn_info = req.connection_info();

let user_ip = match conn_info.peer_addr() {
// We need to use this in pour async function after req is dropped
// so we need to use `.to_owned()`
Some(ip) => ip,
None => {
return HttpResponse::build(StatusCode::BAD_REQUEST).body("Missing IP");
}
};

// We need to use this in our actix:rt spawned function
// after req is dropped so we need to use `.to_owned()`
let user_ip_owned = user_ip.to_owned();

let parsed = match query::parse_announce(user_ip, query.replace("%", "%25").as_bytes()) {
Expand Down

0 comments on commit abbd564

Please sign in to comment.