Skip to content

Commit

Permalink
style: rustfmt
Browse files Browse the repository at this point in the history
  • Loading branch information
SkuldNorniern authored and github-actions[bot] committed Mar 12, 2024
1 parent 19a5709 commit 4af371b
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
3 changes: 1 addition & 2 deletions src/net/capture.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,7 @@ fn initialize_capture(device: Device) -> Result<Capture<Active>, PcapError> {
info!("Opening capture session for device {}", device.name);
Capture::from_device(device)?
.promisc(true)

// FEAT:TASK: set snaplen as a Flag from the CLI
// FEAT:TASK: set snaplen as a Flag from the CLI
.snaplen(1024)
.timeout(60000)
.immediate_mode(true)
Expand Down
2 changes: 1 addition & 1 deletion src/net/online_fluereflow.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ use crate::{
use fluere_config::Config;

// FEAT:TASK: set plugin as feature
// | Since the plugin manager uses Lua, for edge cases that require minimal feature,
// | Since the plugin manager uses Lua, for edge cases that require minimal feature,
// | setting the plugin as a feature would be beneficial.
use fluere_plugin::PluginManager;
use fluereflow::FluereRecord;
Expand Down
2 changes: 1 addition & 1 deletion src/net/packet_pcap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ pub async fn pcap_capture(args: Args) {
};

let start = Instant::now();

loop {
match cap.next_packet() {
Err(_) => {
Expand Down
6 changes: 4 additions & 2 deletions src/net/parser/time.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,10 @@ pub fn parse_microseconds(sec: u64, usec: u64) -> u64 {

#[inline]
pub fn microseconds_to_timestamp(usec: u64) -> String {
let naive = DateTime::from_timestamp(usec as i64, 0).unwrap().naive_utc();

let naive = DateTime::from_timestamp(usec as i64, 0)
.unwrap()
.naive_utc();

#[cfg(not(target_os = "windows"))]
let datetime = DateTime::<Utc>::from_naive_utc_and_offset(naive, Utc);

Expand Down

0 comments on commit 4af371b

Please sign in to comment.