Skip to content

Commit

Permalink
Run cargo fmt
Browse files Browse the repository at this point in the history
This is a periodic out-of-band run of cargo fmt. It'd be neat to
have this as a check in the build of cernan so, uh, maybe I'll
take a look into doing that.

Signed-off-by: Brian L. Troutwine <blt@postmates.com>
  • Loading branch information
Brian L. Troutwine committed Jan 26, 2017
1 parent 032e0ba commit efb2583
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
//! If you'd like to learn more, please do have a look in
//! our [wiki](https://github.com/postmates/cernan/wiki/).
#![deny(trivial_numeric_casts,
// missing_docs,
// missing_docs,
unstable_features,
unused_import_braces,
)]
Expand Down
4 changes: 3 additions & 1 deletion src/protocols/statsd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,9 @@ mod tests {
fn test_metric_sample_gauge() {
let metric = sync::Arc::new(Some(Telemetry::default()));
let mut res = Vec::new();
assert!(parse_statsd("foo:1|g|@+0.22\nbar:101|g|@2\nbaz:2|g@0.2\nqux:4|g@0.1", &mut res, metric));
assert!(parse_statsd("foo:1|g|@+0.22\nbar:101|g|@2\nbaz:2|g@0.2\nqux:4|g@0.1",
&mut res,
metric));
// 0 A F
assert_eq!(res[0].aggr_method, AggregationMethod::Set);
assert_eq!(res[0].name, "foo");
Expand Down
10 changes: 6 additions & 4 deletions src/sink/console.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
//! TODO
//! TODO
use buckets::Buckets;
use chrono;
use metric::{AggregationMethod, LogLine, Telemetry};
Expand All @@ -19,7 +20,8 @@ impl Console {
///
/// ```
/// use cernan::sink::{Console, ConsoleConfig};
/// let config = ConsoleConfig { config_path: "sinks.console".to_string(), bin_width: 2 };
/// let config = ConsoleConfig { config_path: "sinks.console".to_string(),
/// bin_width: 2 };
/// let c = Console::new(config);
/// ```
pub fn new(config: ConsoleConfig) -> Console {
Expand All @@ -29,10 +31,10 @@ impl Console {

/// The configuration struct for Console. There's not a whole lot to configure
/// here, independent of other sinks, but Console does do aggregations and that
/// requires knowing what the user wants for `bin_width`.
/// requires knowing what the user wants for `bin_width`.
#[derive(Debug)]
pub struct ConsoleConfig {
/// The sink's unique name in the routing topology.
/// The sink's unique name in the routing topology.
pub config_path: String,
/// Sets the bin width for Console's underlying
/// [bucket](../buckets/struct.Bucket.html).
Expand Down
1 change: 1 addition & 0 deletions src/sink/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
//! ... -> sink` chain. The sink has no obligations with regard to the telemetry
//! and log lines it receives, other than to receive them. Individual sinks make
//! different choices.
use hopper;
use metric::{Event, LogLine, Telemetry};
use std::sync;
Expand Down
2 changes: 1 addition & 1 deletion src/source/native.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
use byteorder::{BigEndian, ReadBytesExt};
use hopper;
use metric;
use protocols::native::{AggregationMethod, Payload};
use protobuf;
use protocols::native::{AggregationMethod, Payload};
use std::io;
use std::io::Read;
use std::net::{TcpListener, TcpStream, ToSocketAddrs};
Expand Down

0 comments on commit efb2583

Please sign in to comment.