Skip to content

Commit

Permalink
Fix the example so that it has a better chance to compile
Browse files Browse the repository at this point in the history
  • Loading branch information
ivmarkov committed Jan 19, 2024
1 parent 4a2cfaf commit ddbdb70
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/http/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,9 @@
//! let mut server = EspHttpServer::new(&Configuration::default())?;
//!
//! server.fn_handler("/index.html", Method::Get, |request| {
//! request.into_ok_response()?
//! .write_all("<html><body>Hello world!</body></html>".as_bytes());
//!
//! Ok(());
//! request
//! .into_ok_response()?
//! .write_all(b"<html><body>Hello world!</body></html>")
//! })?;
//! ```
//!
Expand Down

0 comments on commit ddbdb70

Please sign in to comment.