Skip to content

Commit

Permalink
style: Run rustfmt
Browse files Browse the repository at this point in the history
  • Loading branch information
jan-auer committed Jun 1, 2018
1 parent 1147a06 commit 57e91e9
Show file tree
Hide file tree
Showing 7 changed files with 34 additions and 36 deletions.
2 changes: 1 addition & 1 deletion src/client/noop.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
//! The noop fallback client for shim only users.
use uuid::Uuid;

use api::Dsn;
use api::protocol::Event;
use api::Dsn;
use scope::noop::Scope;

/// The "shim only" Sentry client.
Expand Down
20 changes: 9 additions & 11 deletions src/integrations/log.rs
Original file line number Diff line number Diff line change
Expand Up @@ -97,18 +97,16 @@ pub fn event_from_record(record: &log::Record, with_stacktrace: bool) -> Event<'
Event {
logger: Some(record.target().into()),
level: convert_log_level(record.level()),
exceptions: vec![
Exception {
ty: record.target().into(),
value: Some(format!("{}", record.args())),
stacktrace: if with_stacktrace {
current_stacktrace()
} else {
None
},
..Default::default()
exceptions: vec![Exception {
ty: record.target().into(),
value: Some(format!("{}", record.args())),
stacktrace: if with_stacktrace {
current_stacktrace()
} else {
None
},
],
..Default::default()
}],
..Default::default()
}
}
Expand Down
14 changes: 6 additions & 8 deletions src/integrations/panic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,12 @@ pub fn message_from_panic_info<'a>(info: &'a panic::PanicInfo) -> &'a str {
pub fn event_from_panic_info(info: &panic::PanicInfo) -> Event<'static> {
let msg = message_from_panic_info(info);
Event {
exceptions: vec![
Exception {
ty: "panic".into(),
value: Some(msg.to_string()),
stacktrace: current_stacktrace(),
..Default::default()
},
],
exceptions: vec![Exception {
ty: "panic".into(),
value: Some(msg.to_string()),
stacktrace: current_stacktrace(),
..Default::default()
}],
level: Level::Fatal,
..Default::default()
}
Expand Down
10 changes: 8 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,14 @@
extern crate backtrace;
#[cfg(feature = "with_client_implementation")]
extern crate im;
#[cfg(any(feature = "with_backtrace", feature = "with_client_implementation",
feature = "with_failure", feature = "with_device_info"))]
#[cfg(
any(
feature = "with_backtrace",
feature = "with_client_implementation",
feature = "with_failure",
feature = "with_device_info"
)
)]
#[macro_use]
extern crate lazy_static;
#[cfg(feature = "with_client_implementation")]
Expand Down
20 changes: 8 additions & 12 deletions src/scope/real.rs
Original file line number Diff line number Diff line change
Expand Up @@ -97,24 +97,20 @@ struct StackLayer {
impl Stack {
pub fn for_process() -> Stack {
Stack {
layers: vec![
StackLayer {
client: None,
scope: default_scope(),
},
],
layers: vec![StackLayer {
client: None,
scope: default_scope(),
}],
ty: StackType::Process,
}
}

pub fn for_thread() -> Stack {
Stack {
layers: vec![
with_process_stack(|stack| StackLayer {
client: stack.client(),
scope: stack.scope().clone(),
}),
],
layers: vec![with_process_stack(|stack| StackLayer {
client: stack.client(),
scope: stack.scope().clone(),
})],
ty: StackType::Thread,
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/transport.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ use reqwest::header::{Headers, RetryAfter};
use reqwest::{Client, StatusCode};
use uuid::Uuid;

use Dsn;
use protocol::Event;
use Dsn;

/// A transport can send rust events.
#[derive(Debug)]
Expand Down
2 changes: 1 addition & 1 deletion src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ mod model_support {
#[cfg(feature = "with_debug_meta")]
mod findshlibs_support {
use super::*;
use api::protocol::SymbolicDebugImage;
use api::protocol::debugid::DebugId;
use api::protocol::SymbolicDebugImage;
use findshlibs::{Segment, SharedLibrary, SharedLibraryId, TargetSharedLibrary,
TARGET_SUPPORTED};
use uuid::Uuid;
Expand Down

0 comments on commit 57e91e9

Please sign in to comment.