Skip to content

Commit

Permalink
chore(examples): Call Routes::prepare (#1857)
Browse files Browse the repository at this point in the history
  • Loading branch information
tottoto authored Aug 23, 2024
1 parent c3be20c commit 4c9356c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion examples/src/h2c/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
println!("GreeterServer listening on {}", addr);

let incoming = TcpListener::bind(addr).await?;
let svc = Routes::new(GreeterServer::new(greeter));
let svc = Routes::new(GreeterServer::new(greeter)).prepare();

let h2c = h2c::H2c { s: svc };

Expand Down
2 changes: 1 addition & 1 deletion examples/src/tls_rustls/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {

let server = EchoServer::default();

let svc = Routes::new(pb::echo_server::EchoServer::new(server));
let svc = Routes::new(pb::echo_server::EchoServer::new(server)).prepare();

let http = Builder::new(TokioExecutor::new());

Expand Down

0 comments on commit 4c9356c

Please sign in to comment.