Skip to content

Commit 719cc3b

Browse files
committed
clippy::needless_doctest_main
1 parent a66706d commit 719cc3b

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

src/endpoint.rs

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,8 @@ use crate::{Middleware, Request, Response};
2727
/// Ok(String::from("hello"))
2828
/// }
2929
///
30-
/// fn main() {
31-
/// let mut app = tide::Server::new();
32-
/// app.at("/hello").get(hello);
33-
/// }
30+
/// let mut app = tide::Server::new();
31+
/// app.at("/hello").get(hello);
3432
/// ```
3533
///
3634
/// An endpoint with similar functionality that does not make use of the `async` keyword would look something like this:
@@ -41,10 +39,8 @@ use crate::{Middleware, Request, Response};
4139
/// async_std::future::ready(Ok(String::from("hello")))
4240
/// }
4341
///
44-
/// fn main() {
45-
/// let mut app = tide::Server::new();
46-
/// app.at("/hello").get(hello);
47-
/// }
42+
/// let mut app = tide::Server::new();
43+
/// app.at("/hello").get(hello);
4844
/// ```
4945
///
5046
/// Tide routes will also accept endpoints with `Fn` signatures of this form, but using the `async` keyword has better ergonomics.

0 commit comments

Comments
 (0)