Turned unwrap-or into unwrap-or-else
This commit is contained in:
parent
97a556d4f4
commit
5924aa2eaa
@ -265,7 +265,7 @@ fn handle_connection(
|
|||||||
let (mut relative_path, _) = request
|
let (mut relative_path, _) = request
|
||||||
.path
|
.path
|
||||||
.split_once('?')
|
.split_once('?')
|
||||||
.unwrap_or((&request.path, Default::default()));
|
.unwrap_or_else(|| (&request.path, Default::default()));
|
||||||
|
|
||||||
if relative_path.contains("//") {
|
if relative_path.contains("//") {
|
||||||
fail(stream);
|
fail(stream);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user