Skip to content

Commit

Permalink
fix(deps): update rust crate axum to 0.7.4 (#193)
Browse files Browse the repository at this point in the history
* fix(deps): update rust crate axum to 0.7.4

Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* fix: migrate to axum v0.7

Signed-off-by: koyashiro <6698252+koyashiro@users.noreply.github.com>

---------

Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Signed-off-by: koyashiro <6698252+koyashiro@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: koyashiro <6698252+koyashiro@users.noreply.github.com>
  • Loading branch information
renovate[bot] and koyashiro authored Feb 6, 2024
1 parent cf21167 commit 50b48ee
Show file tree
Hide file tree
Showing 3 changed files with 125 additions and 74 deletions.
191 changes: 121 additions & 70 deletions 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
Expand Up @@ -6,7 +6,7 @@ license = "MIT"

[dependencies]
anyhow = "1.0.79"
axum = "0.6.20"
axum = "0.7.4"
time = { version = "0.3.34", features = ["local-offset"] }
tokio = { version = "1.36.0", features = ["full"] }
serde = { version = "1.0.196", features = ["derive"] }
Expand Down
6 changes: 3 additions & 3 deletions src/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ use std::net::SocketAddr;

use anyhow::Result;
use time::OffsetDateTime;
use tokio::net::TcpListener;

const DEFAULT_PORT: u16 = 11400;

Expand All @@ -22,9 +23,8 @@ pub async fn start() -> Result<()> {

println!("listening on {addr}");
println!("START {local_datetime}");
axum::Server::bind(&addr)
.serve(app.into_make_service())
.await?;
let listener = TcpListener::bind(&addr).await?;
axum::serve(listener, app).await?;

Ok(())
}

0 comments on commit 50b48ee

Please sign in to comment.