summaryrefslogtreecommitdiff
path: root/cli/args/mod.rs
diff options
context:
space:
mode:
authorSatya Rohith <me@satyarohith.com>2024-05-17 11:08:50 +0530
committerGitHub <noreply@github.com>2024-05-17 05:38:50 +0000
commit20cb0e8863beb0d709adc2f41905ce3f1f465447 (patch)
tree4a07e3bf67905e14513d8372db84169d493dfc8f /cli/args/mod.rs
parent2b560be83f621af5cab1ff09fa0e76c826e6870a (diff)
feat(serve): support `--port 0` to use an open port (#23846)
Closes https://github.com/denoland/deno/issues/23845
Diffstat (limited to 'cli/args/mod.rs')
-rw-r--r--cli/args/mod.rs3
1 files changed, 1 insertions, 2 deletions
diff --git a/cli/args/mod.rs b/cli/args/mod.rs
index 0a0f7d704..b3d508e18 100644
--- a/cli/args/mod.rs
+++ b/cli/args/mod.rs
@@ -62,7 +62,6 @@ use std::env;
use std::io::BufReader;
use std::io::Cursor;
use std::net::SocketAddr;
-use std::num::NonZeroU16;
use std::num::NonZeroUsize;
use std::path::Path;
use std::path::PathBuf;
@@ -1036,7 +1035,7 @@ impl CliOptions {
}
}
- pub fn serve_port(&self) -> Option<NonZeroU16> {
+ pub fn serve_port(&self) -> Option<u16> {
if let DenoSubcommand::Serve(flags) = self.sub_command() {
Some(flags.port)
} else {