diff options
| author | nokoe <nokoe@mailbox.org> | 2026-02-26 05:15:54 +0100 |
|---|---|---|
| committer | nokoe <nokoe@mailbox.org> | 2026-02-27 19:31:14 +0100 |
| commit | a859bceeddc8e746bba630b3cc197532b68adbcb (patch) | |
| tree | f8e033595d21e4de34774e4caed8b483c7eba5c6 /server/discover/src/main.rs | |
| parent | 6419d8c8139d697af309b7db2e698effa8290582 (diff) | |
| download | hurrycurry-a859bceeddc8e746bba630b3cc197532b68adbcb.tar hurrycurry-a859bceeddc8e746bba630b3cc197532b68adbcb.tar.bz2 hurrycurry-a859bceeddc8e746bba630b3cc197532b68adbcb.tar.zst | |
use stable rust toolchainstable-rust
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", ))), |