Fix or_fun clippy lint

This commit is contained in:
Lucien Greathouse
2019-08-27 16:23:58 -07:00
parent 49e10698b1
commit 4d0dee7ee8

View File

@@ -39,9 +39,11 @@ pub fn serve(options: &ServeOptions) -> Result<(), ServeError> {
let port = options
.port
.or(maybe_project
.as_ref()
.and_then(|project| project.serve_port))
.or_else(|| {
maybe_project
.as_ref()
.and_then(|project| project.serve_port)
})
.unwrap_or(DEFAULT_PORT);
println!("Rojo server listening on port {}", port);