diff options
Diffstat (limited to 'server/discover/src/main.rs')
| -rw-r--r-- | server/discover/src/main.rs | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/server/discover/src/main.rs b/server/discover/src/main.rs index 3dcb96bf..8b86af74 100644 --- a/server/discover/src/main.rs +++ b/server/discover/src/main.rs @@ -15,7 +15,6 @@ along with this program. If not, see <https://www.gnu.org/licenses/>. */ -#![feature(never_type)] use anyhow::Result; use clap::Parser; use http_body_util::Full; @@ -37,7 +36,7 @@ struct Args { version: bool, } -fn main() -> Result<()> { +fn main() -> anyhow::Result<()> { let args = Args::parse(); if args.version { println!("{}", env!("CARGO_PKG_VERSION")); @@ -49,8 +48,10 @@ fn main() -> Result<()> { .enable_all() .build()? .block_on(async_main())?; + Ok(()) } -async fn async_main() -> Result<!> { + +async fn async_main() -> Result<anyhow::Error /*TODO: never type*/> { let mdns = ServiceDaemon::new()?; let mdns_events = mdns.browse("_hurrycurry._tcp.local.")?; @@ -113,7 +114,7 @@ async fn async_main() -> Result<!> { service_fn(move |_req| { let entries = entries.clone(); async move { - Ok::<_, !>(match _req.uri().path() { + anyhow::Ok(match _req.uri().path() { "/" => Response::new(Full::new(Bytes::from( "Hurry Curry! local discovery service", ))), |