Skip to content

Commit 85d378a

Browse files
committed
docs: clean up meaning of field
1 parent 72a7f86 commit 85d378a

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/serve/mod.rs

+5-4
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@ const INDEX_HTML: &str = "index.html";
3636
pub struct ServeSystem {
3737
cfg: Arc<RtcServe>,
3838
watch: WatchSystem,
39-
http_addr: String,
39+
/// The URL to open when starting
40+
open_http_addr: String,
4041
shutdown_tx: broadcast::Sender<()>,
4142
// N.B. we use a broadcast channel here because a watch channel triggers a
4243
// false positive on the first read of channel
@@ -60,11 +61,11 @@ impl ServeSystem {
6061
None => IpAddr::V4(Ipv4Addr::LOCALHOST),
6162
};
6263
let base = cfg.serve_base()?;
63-
let http_addr = format!("{prefix}://{address}:{port}{base}", port = cfg.port);
64+
let open_http_addr = format!("{prefix}://{address}:{port}{base}", port = cfg.port);
6465
Ok(Self {
6566
cfg,
6667
watch,
67-
http_addr,
68+
open_http_addr,
6869
shutdown_tx: shutdown,
6970
ws_state,
7071
})
@@ -84,7 +85,7 @@ impl ServeSystem {
8485

8586
// Open the browser.
8687
if self.cfg.open {
87-
if let Err(err) = open::that(self.http_addr) {
88+
if let Err(err) = open::that(self.open_http_addr) {
8889
tracing::error!(error = ?err, "error opening browser");
8990
}
9091
}

0 commit comments

Comments
 (0)