Skip to content

Commit

Permalink
Apply rustfmt
Browse files Browse the repository at this point in the history
  • Loading branch information
daschl committed Mar 13, 2018
1 parent 528570c commit 27adb2e
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 9 deletions.
11 changes: 5 additions & 6 deletions opentracing-api/src/context.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/// SpanContext represents Span state that must propagate to
/// `SpanContext` represents Span state that must propagate to
/// descendant Spans and across process boundaries.
///
/// SpanContext is logically divided into two pieces: (1) the user-level "Baggage" that
/// `SpanContext` is logically divided into two pieces: (1) the user-level "Baggage" that
/// propagates across Span boundaries and (2) any Tracer-implementation-specific fields
/// that are needed to identify or otherwise contextualize the associated Span instance
/// (e.g., a `(trace_id, span_id, sampled)` tuple).
Expand All @@ -25,9 +25,10 @@ mod tests {
struct TestContext {
items: HashMap<String, String>,
}

impl<'a> SpanContext<'a> for TestContext {
type Iter = HashMapIter<'a, String, String>;

fn baggage_items(&'a self) -> Self::Iter {
self.items.iter()
}
Expand All @@ -37,9 +38,7 @@ mod tests {
fn get_items() {
let mut items = HashMap::new();
items.insert("key".into(), "value".into());
let context = TestContext {
items: items
};
let context = TestContext { items: items };
let items: Vec<(&String, &String)> = context.baggage_items().collect();
assert_eq!(items, [(&"key".into(), &"value".into())])
}
Expand Down
2 changes: 1 addition & 1 deletion opentracing-api/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ mod tag;
mod field;

pub use context::SpanContext;
pub use tag::{Tags, ParseTagsError};
pub use tag::{ParseTagsError, Tags};
pub use field::{Fields, ParseFieldsError};
2 changes: 1 addition & 1 deletion opentracing-mock/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1 +1 @@
#![doc(html_root_url = "https://docs.rs/opentracing-mock/0.1.0")]
#![doc(html_root_url = "https://docs.rs/opentracing-mock/0.1.0")]
2 changes: 1 addition & 1 deletion opentracing-noop/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1 +1 @@
#![doc(html_root_url = "https://docs.rs/opentracing-noop/0.1.0")]
#![doc(html_root_url = "https://docs.rs/opentracing-noop/0.1.0")]

0 comments on commit 27adb2e

Please sign in to comment.