Skip to content

Commit

Permalink
chore: axum 0.7 / maud >0.25 compat
Browse files Browse the repository at this point in the history
Maud has compatability for 0.7 with
lambda-fairy/maud#401 but it isn't released in a
0.26 version yet.

Use a source release with specific rev until a 0.26 is cut
  • Loading branch information
philipcristiano committed Jan 4, 2024
1 parent 31b7d31 commit c2d8705
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 14 deletions.
13 changes: 5 additions & 8 deletions Cargo.lock

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

6 changes: 5 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,11 @@ license = "Apache-2.0"
anyhow = "1.0.78"
axum = "0.7.3"
clap = { version = "4.4.12", features = ["derive", "env"]}
maud = { version = "0.25.0", features = ["axum"] }

# Waiting on a release of maud to have axum 0.7 compat
# maud = { version = "0.25.0", features = ["axum"] }
maud = { git = "https://github.com/lambda-fairy/maud.git", rev="320add8", features = ["axum"] }

once_cell = "1.19.0"
openidconnect = "3.4.0"
serde = { version = "1.0", features = ["derive"] }
Expand Down
8 changes: 3 additions & 5 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,9 @@ async fn main() {
);

let addr: SocketAddr = args.bind_addr.parse().expect("Expected bind addr");
tracing::info!("listening on http://{}", addr);
axum::Server::bind(&addr)
.serve(app.into_make_service())
.await
.unwrap();
tracing::info!("listening on {}", addr);
let listener = tokio::net::TcpListener::bind(&addr).await.unwrap();
axum::serve(listener, app).await.unwrap();
}

// basic handler that responds with a static string
Expand Down

0 comments on commit c2d8705

Please sign in to comment.