agate

Simple gemini server for static files
git clone https://github.com/mbrubeck/agate.git
Log | Files | Refs | README

commit a9588350a0dccdaa31218584382464a20dedebbd
parent 03325ba1a4bc9aa53aa3312217d88e085fc817f1
Author: Johann150 <johann.galle@protonmail.com>
Date:   Tue,  9 Feb 2021 15:01:26 +0100

format using cargo fmt

Diffstat:
Msrc/main.rs | 10+++++++---
1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/src/main.rs b/src/main.rs @@ -118,7 +118,11 @@ fn args() -> Result<Args> { ); opts.optflag("s", "silent", "Disable logging output"); opts.optflag("h", "help", "Print this help menu"); - opts.optflag("3", "only-tls13", "Only use TLSv1.3 (default also allows TLSv1.2)"); + opts.optflag( + "3", + "only-tls13", + "Only use TLSv1.3 (default also allows TLSv1.2)", + ); opts.optflag( "", "serve-secret", @@ -129,7 +133,7 @@ fn args() -> Result<Args> { let matches = opts.parse(&args[1..]).map_err(|f| f.to_string())?; if matches.opt_present("h") { let usage = opts.usage(&format!("Usage: {} [options]", &args[0])); - return Err(usage.into()) + return Err(usage.into()); } let hostname = match matches.opt_str("hostname") { Some(s) => Some(Host::parse(&s)?), @@ -338,7 +342,7 @@ impl RequestHandle { Ok(file) => file, Err(e) => { self.send_header(51, "Not found, sorry.").await?; - return Err(e.into()) + return Err(e.into()); } };