From 2f614c58e435211184ca5bcfc4df0deb8ad681b6 Mon Sep 17 00:00:00 2001 From: ben kornmeier Date: Tue, 10 Dec 2019 12:09:29 -0700 Subject: [PATCH] disable rust-fmt in travis to see if our issue is https://github.com/rust-lang/rust/issues/65424 --- .travis.yml | 5 +++-- src/lib.rs | 2 +- src/stats.rs | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index edbf98a..36d2c79 100644 --- a/.travis.yml +++ b/.travis.yml @@ -18,11 +18,12 @@ matrix: env: TARGET=i686-unknown-linux-gnu before_script: - - cargo +nightly install --force rustfmt-nightly + - cargo +nightly install + #- cargo +nightly install --force rustfmt-nightly script: - export PATH="/usr/include:$PATH" - - cargo +nightly fmt --all -- --check + #- cargo +nightly fmt --all -- --check - cargo test - cargo doc --no-deps diff --git a/src/lib.rs b/src/lib.rs index ed6bd31..68a2c35 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -33,7 +33,7 @@ mod stats; mod stream; pub use crate::{ - config::Config, errors::Error, handle::Handle, info::Info, packet::Packet, stats::Stats, + config::Config, errors::Error, handle::Handle, info::Info, packet::Packet, stats::Stats, stats::EMPTY_STATS, stream::PacketStream, bridge_stream::BridgeStream }; diff --git a/src/stats.rs b/src/stats.rs index 1886810..05dd135 100644 --- a/src/stats.rs +++ b/src/stats.rs @@ -5,7 +5,7 @@ pub struct Stats { pub dropped_by_interface: u32, } -//pub const EMPTY_STATS: Stats = Stats{ received: 0, dropped_by_kernel: 0, dropped_by_interface: 0 }; +pub const EMPTY_STATS: Stats = Default::default(); impl Stats { pub fn combine(&self, other: &Stats) -> Stats {