refactor: create trait for writing response from interpreter
This commit is contained in:
parent
b87ff160d2
commit
b5405d7575
7 changed files with 118 additions and 80 deletions
|
|
@ -1,6 +1,7 @@
|
|||
use clap::Parser;
|
||||
use std::net::{IpAddr, Ipv4Addr, SocketAddr};
|
||||
use std::path::PathBuf;
|
||||
use std::time::Duration;
|
||||
|
||||
const LOCAL_IPV4: IpAddr = IpAddr::V4(Ipv4Addr::LOCALHOST);
|
||||
|
||||
|
|
@ -34,7 +35,7 @@ impl Configuration {
|
|||
}
|
||||
|
||||
#[inline]
|
||||
pub fn get_throttle(&self) -> Option<u64> {
|
||||
self.throttle
|
||||
pub fn get_throttle(&self) -> Option<Duration> {
|
||||
self.throttle.map(|d| Duration::from_millis(d))
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue