Skip to content

Commit

Permalink
Bump axum from 0.6.20 to 0.7.2 (#158)
Browse files Browse the repository at this point in the history
* Bump axum from 0.6.20 to 0.7.2

Bumps [axum](https://github.com/tokio-rs/axum) from 0.6.20 to 0.7.2.
- [Release notes](https://github.com/tokio-rs/axum/releases)
- [Changelog](https://github.com/tokio-rs/axum/blob/main/CHANGELOG.md)
- [Commits](tokio-rs/axum@axum-v0.6.20...axum-v0.7.2)

---
updated-dependencies:
- dependency-name: axum
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

* Adapt to new axum 0.7

* cargo fmt

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: mw <[email protected]>
  • Loading branch information
dependabot[bot] and mw authored Dec 11, 2023
1 parent c841239 commit c86aeee
Show file tree
Hide file tree
Showing 3 changed files with 82 additions and 21 deletions.
94 changes: 78 additions & 16 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 @@ -8,7 +8,7 @@ version = "0.1.0"

[dependencies]
anyhow = "1.0"
axum = "0.6"
axum = "0.7"
env_logger = "0.10"
futures = "0.3"

Expand Down
7 changes: 3 additions & 4 deletions src/api.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use anyhow::Result;
use axum::{
routing::{get, post},
Router, Server,
Router,
};

use crate::routes::{compile, create_gist, evaluate, static_css, static_html, static_js};
Expand Down Expand Up @@ -33,7 +33,6 @@ pub async fn serve(addr: SocketAddr, github_client: GithubClient) -> Result<()>
.route("/gist.json", post(create_gist))
.with_state(github_client)
.nest("/static", static_routes);
Ok(Server::bind(&addr)
.serve(router.into_make_service())
.await?)
let listener = tokio::net::TcpListener::bind(&addr).await?;
Ok(axum::serve(listener, router).await?)
}

0 comments on commit c86aeee

Please sign in to comment.