Skip to content

Commit d78001f

Browse files
author
Nicholas
authored
Merge pull request #181 from sangheestyle/fix_example_readme
docs: Correct sample code in README Previously, the README example used `failure::Error`. While `failure` is a useful library in many scenarios, `app.serve()` returns `std::io::Result`. Removing `failure` allows the example to compile without additional changes, which could trip up new framework users.
2 parents e06ae37 + 0ac0168 commit d78001f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,10 @@ __Hello World__
5959
```rust
6060
#![feature(async_await)]
6161

62-
fn main() -> Result<(), failure::Error> {
62+
fn main() -> Result<(), std::io::Error> {
6363
let mut app = tide::App::new(());
6464
app.at("/").get(async move |_| "Hello, world!");
65-
app.serve("127.0.0.1:8000")?;
65+
Ok(app.serve("127.0.0.1:8000")?)
6666
}
6767
```
6868

0 commit comments

Comments
 (0)