Skip to content

Commit 3c14255

Browse files
committed
Minor improvements
1 parent 8ed3990 commit 3c14255

3 files changed

Lines changed: 5 additions & 7 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 & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,7 @@ use alloc::{string::String, vec::Vec};
33
use ipnet::Ipv4Net;
44
use macaddr::MacAddr6;
55
use serde::{Deserialize, Serialize};
6-
use std::{
7-
net::{Ipv4Addr, SocketAddrV4},
8-
path::PathBuf,
9-
};
6+
use std::{net::Ipv4Addr, path::PathBuf};
107

118
#[derive(Debug, Eq, PartialEq, Serialize, Deserialize, Clone)]
129
#[serde(rename_all = "lowercase")]
@@ -43,7 +40,7 @@ pub struct HostsConfig {
4340

4441
#[derive(Clone, Debug, Serialize, Deserialize, PartialEq, Eq)]
4542
pub struct HttpConfig {
46-
pub listen_on: SocketAddrV4,
43+
pub listen_on: String,
4744
pub password: Option<String>,
4845
}
4946

0 commit comments

Comments
 (0)