diff options
author | Quentin <quentin@deuxfleurs.fr> | 2020-11-10 15:52:20 +0100 |
---|---|---|
committer | Quentin <quentin@deuxfleurs.fr> | 2020-11-10 15:52:20 +0100 |
commit | cacf8ddf2da9c80574647aeb0d61dd15f9f8c5d5 (patch) | |
tree | f56f66d9b50daddc695630eb44ef098843fd0e9a /src/web/web_server.rs | |
parent | d1b2fcc1e7d54025625c62bff7ef8cb573fab456 (diff) | |
download | garage-cacf8ddf2da9c80574647aeb0d61dd15f9f8c5d5.tar.gz garage-cacf8ddf2da9c80574647aeb0d61dd15f9f8c5d5.zip |
Panic when it is a logical error
Diffstat (limited to 'src/web/web_server.rs')
-rw-r--r-- | src/web/web_server.rs | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/web/web_server.rs b/src/web/web_server.rs index e4d15872..73aa6648 100644 --- a/src/web/web_server.rs +++ b/src/web/web_server.rs @@ -77,10 +77,7 @@ fn authority_to_host(authority: &str) -> Result<&str, Error> { let split = match first_char { '[' => { let mut iter = iter.skip_while(|(_, c)| c != &']'); - iter.next().ok_or(Error::BadRequest(format!( - "Authority {} has an illegal format", - authority - )))?; + iter.next().expect("Authority parsing logic error"); iter.next() } _ => iter.skip_while(|(_, c)| c != &':').next(), |