Skip to content

Commit 57e91e9

Browse files
committed
style: Run rustfmt
1 parent 1147a06 commit 57e91e9

File tree

7 files changed

+34
-36
lines changed

7 files changed

+34
-36
lines changed

src/client/noop.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
//! The noop fallback client for shim only users.
22
use uuid::Uuid;
33

4-
use api::Dsn;
54
use api::protocol::Event;
5+
use api::Dsn;
66
use scope::noop::Scope;
77

88
/// The "shim only" Sentry client.

src/integrations/log.rs

+9-11
Original file line numberDiff line numberDiff line change
@@ -97,18 +97,16 @@ pub fn event_from_record(record: &log::Record, with_stacktrace: bool) -> Event<'
9797
Event {
9898
logger: Some(record.target().into()),
9999
level: convert_log_level(record.level()),
100-
exceptions: vec![
101-
Exception {
102-
ty: record.target().into(),
103-
value: Some(format!("{}", record.args())),
104-
stacktrace: if with_stacktrace {
105-
current_stacktrace()
106-
} else {
107-
None
108-
},
109-
..Default::default()
100+
exceptions: vec![Exception {
101+
ty: record.target().into(),
102+
value: Some(format!("{}", record.args())),
103+
stacktrace: if with_stacktrace {
104+
current_stacktrace()
105+
} else {
106+
None
110107
},
111-
],
108+
..Default::default()
109+
}],
112110
..Default::default()
113111
}
114112
}

src/integrations/panic.rs

+6-8
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,12 @@ pub fn message_from_panic_info<'a>(info: &'a panic::PanicInfo) -> &'a str {
3636
pub fn event_from_panic_info(info: &panic::PanicInfo) -> Event<'static> {
3737
let msg = message_from_panic_info(info);
3838
Event {
39-
exceptions: vec![
40-
Exception {
41-
ty: "panic".into(),
42-
value: Some(msg.to_string()),
43-
stacktrace: current_stacktrace(),
44-
..Default::default()
45-
},
46-
],
39+
exceptions: vec![Exception {
40+
ty: "panic".into(),
41+
value: Some(msg.to_string()),
42+
stacktrace: current_stacktrace(),
43+
..Default::default()
44+
}],
4745
level: Level::Fatal,
4846
..Default::default()
4947
}

src/lib.rs

+8-2
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,14 @@
9595
extern crate backtrace;
9696
#[cfg(feature = "with_client_implementation")]
9797
extern crate im;
98-
#[cfg(any(feature = "with_backtrace", feature = "with_client_implementation",
99-
feature = "with_failure", feature = "with_device_info"))]
98+
#[cfg(
99+
any(
100+
feature = "with_backtrace",
101+
feature = "with_client_implementation",
102+
feature = "with_failure",
103+
feature = "with_device_info"
104+
)
105+
)]
100106
#[macro_use]
101107
extern crate lazy_static;
102108
#[cfg(feature = "with_client_implementation")]

src/scope/real.rs

+8-12
Original file line numberDiff line numberDiff line change
@@ -97,24 +97,20 @@ struct StackLayer {
9797
impl Stack {
9898
pub fn for_process() -> Stack {
9999
Stack {
100-
layers: vec![
101-
StackLayer {
102-
client: None,
103-
scope: default_scope(),
104-
},
105-
],
100+
layers: vec![StackLayer {
101+
client: None,
102+
scope: default_scope(),
103+
}],
106104
ty: StackType::Process,
107105
}
108106
}
109107

110108
pub fn for_thread() -> Stack {
111109
Stack {
112-
layers: vec![
113-
with_process_stack(|stack| StackLayer {
114-
client: stack.client(),
115-
scope: stack.scope().clone(),
116-
}),
117-
],
110+
layers: vec![with_process_stack(|stack| StackLayer {
111+
client: stack.client(),
112+
scope: stack.scope().clone(),
113+
})],
118114
ty: StackType::Thread,
119115
}
120116
}

src/transport.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ use reqwest::header::{Headers, RetryAfter};
77
use reqwest::{Client, StatusCode};
88
use uuid::Uuid;
99

10-
use Dsn;
1110
use protocol::Event;
11+
use Dsn;
1212

1313
/// A transport can send rust events.
1414
#[derive(Debug)]

src/utils.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,8 @@ mod model_support {
6363
#[cfg(feature = "with_debug_meta")]
6464
mod findshlibs_support {
6565
use super::*;
66-
use api::protocol::SymbolicDebugImage;
6766
use api::protocol::debugid::DebugId;
67+
use api::protocol::SymbolicDebugImage;
6868
use findshlibs::{Segment, SharedLibrary, SharedLibraryId, TargetSharedLibrary,
6969
TARGET_SUPPORTED};
7070
use uuid::Uuid;

0 commit comments

Comments
 (0)