Skip to content

Commit 7aeed42

Browse files
committed
Minor improvements
1 parent 8ed3990 commit 7aeed42

3 files changed

Lines changed: 5 additions & 4 deletions

File tree

pixie-server/src/http.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ async fn status(extract::State(state): extract::State<Arc<State>>) -> impl IntoR
182182

183183
pub async fn main(state: Arc<State>) -> Result<()> {
184184
let HttpConfig {
185-
listen_on,
185+
ref listen_on,
186186
ref password,
187187
} = state.config.http;
188188

pixie-server/src/state/mod.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,8 @@ impl State {
208208
};
209209

210210
let run_dir = PathBuf::from(format!("/run/pixie-{}", std::process::id()));
211-
std::fs::create_dir(&run_dir)?;
211+
std::fs::create_dir(&run_dir)
212+
.with_context(|| format!("failed to create directory {}", run_dir.display()))?;
212213

213214
let cancel_token = CancellationToken::new();
214215

pixie-shared/src/config.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use ipnet::Ipv4Net;
44
use macaddr::MacAddr6;
55
use serde::{Deserialize, Serialize};
66
use std::{
7-
net::{Ipv4Addr, SocketAddrV4},
7+
net::Ipv4Addr,
88
path::PathBuf,
99
};
1010

@@ -43,7 +43,7 @@ pub struct HostsConfig {
4343

4444
#[derive(Clone, Debug, Serialize, Deserialize, PartialEq, Eq)]
4545
pub struct HttpConfig {
46-
pub listen_on: SocketAddrV4,
46+
pub listen_on: String,
4747
pub password: Option<String>,
4848
}
4949

0 commit comments

Comments
 (0)