diff options
author | Teddy Wing | 2020-07-04 15:46:15 +0200 |
---|---|---|
committer | Teddy Wing | 2020-07-04 15:50:24 +0200 |
commit | a95349de02343a89ba9b485861f57c17d39490e9 (patch) | |
tree | 0bc70ea63ca879820d96fbbd4f7f90752435a628 /src/server.rs | |
parent | 9b8f7dcaa4c3c054d4e3e1edc7e0780167d2a59a (diff) | |
download | fastcgi-conduit-a95349de02343a89ba9b485861f57c17d39490e9.tar.bz2 |
Server::start: Return a `Server` directly instead of a `Result`
We don't have any `Result`s to propagate in this function, so the
`Result` return wrapper is unnecessary.
Must have copied this signature from Civet without thinking:
https://github.com/conduit-rust/rust-civet/blob/ab9c52ca634f65439060c2248295d2ac354aead5/src/lib.rs#L214
Diffstat (limited to 'src/server.rs')
-rw-r--r-- | src/server.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/server.rs b/src/server.rs index 95f8325..548d1a4 100644 --- a/src/server.rs +++ b/src/server.rs @@ -45,7 +45,7 @@ impl Server { /// requests and handle them using `handler`. /// /// [fastcgi::run]: ../../fastcgi/fn.run.html - pub fn start<H: Handler + 'static + Sync>(handler: H) -> io::Result<Server> { + pub fn start<H: Handler + 'static + Sync>(handler: H) -> Server { fastcgi::run(move |mut raw_request| { match handle_request(&mut raw_request, &handler) { Ok(_) => (), @@ -68,7 +68,7 @@ impl Server { } }); - Ok(Server{}) + Server{} } } |