Skip to content

Commit

Permalink
Formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
orf committed Dec 15, 2024
1 parent 5bc66e1 commit 29589fe
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 43 deletions.
40 changes: 0 additions & 40 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions pinger/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ anyhow = "1.0.94"
thiserror = "2.0.7"
rand = "0.8.5"
lazy-regex = "3.3.0"
derive-new = "0.7.0"
which = "7.0.0"

[target.'cfg(windows)'.dependencies]
winping = "0.10.1"
Expand Down
12 changes: 11 additions & 1 deletion pinger/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,23 @@ mod fake;
#[cfg(test)]
mod test;

#[derive(Debug, Clone, derive_new::new)]
#[derive(Debug, Clone)]
pub struct PingOptions {
pub target: String,
pub interval: Duration,
pub interface: Option<String>,
}

impl PingOptions {
pub fn new(target: String, interval: Duration, interface: Option<String>) -> Self {
Self {
target,
interval,
interface,
}
}
}

pub fn run_ping(
cmd: impl AsRef<OsStr> + Debug,
args: Vec<impl AsRef<OsStr> + Debug>,
Expand Down

0 comments on commit 29589fe

Please sign in to comment.