File tree 11 files changed +36
-27
lines changed
integrations/sentry-actix
11 files changed +36
-27
lines changed Original file line number Diff line number Diff line change @@ -17,10 +17,7 @@ env: # Needed for allow_failures
17
17
matrix :
18
18
include :
19
19
- env : SUITE=format-check
20
- install : rustup component add rustfmt-preview
21
20
- env : SUITE=lint
22
- install : rustup component add clippy-preview
23
- rust : nightly
24
21
- env : SUITE=check
25
22
rust : " 1.28.0"
26
23
- env : SUITE=cargotest
Original file line number Diff line number Diff line change @@ -73,9 +73,11 @@ test: checkall cargotestall
73
73
.PHONY : test
74
74
75
75
format-check :
76
+ @rustup component add rustfmt-preview 2> /dev/null
76
77
@cargo fmt -- --check
77
78
.PHONY : format-check
78
79
79
80
lint :
80
- @cargo +nightly clippy --all-features --tests -- -D clippy
81
+ @rustup component add clippy-preview 2> /dev/null
82
+ @cargo clippy --all-features --tests -- -D clippy
81
83
.PHONY : lint
Original file line number Diff line number Diff line change @@ -7,7 +7,11 @@ extern crate sentry;
7
7
use sentry:: integrations:: failure:: capture_error;
8
8
9
9
#[ derive( Fail , Debug ) ]
10
- #[ fail( display = "An error occurred with error code {}. ({})" , code, message) ]
10
+ #[ fail(
11
+ display = "An error occurred with error code {}. ({})" ,
12
+ code,
13
+ message
14
+ ) ]
11
15
struct MyError {
12
16
code : i32 ,
13
17
message : String ,
Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ fn main() {
50
50
error ! ( "Failing!" ) ;
51
51
} ) ;
52
52
} ) . join ( )
53
- . unwrap ( ) ;
54
- } ) . join ( )
55
53
. unwrap ( ) ;
54
+ } ) . join ( )
55
+ . unwrap ( ) ;
56
56
}
Original file line number Diff line number Diff line change @@ -22,6 +22,6 @@ fn main() {
22
22
. middleware ( SentryMiddleware :: builder ( ) . emit_header ( true ) . finish ( ) )
23
23
. resource ( "/" , |r| r. f ( failing) )
24
24
} ) . bind ( "127.0.0.1:3001" )
25
- . unwrap ( )
26
- . run ( ) ;
25
+ . unwrap ( )
26
+ . run ( ) ;
27
27
}
Original file line number Diff line number Diff line change @@ -181,7 +181,7 @@ fn extract_request<S: 'static>(
181
181
req. connection_info( ) . host( ) ,
182
182
req. uri( )
183
183
) . parse ( )
184
- . ok ( ) ,
184
+ . ok ( ) ,
185
185
method : Some ( req. method ( ) . to_string ( ) ) ,
186
186
headers : req
187
187
. headers ( )
Original file line number Diff line number Diff line change @@ -98,8 +98,7 @@ pub fn demangle_symbol(s: &str) -> String {
98
98
"u22" => "\" " ,
99
99
_ => unreachable ! ( ) ,
100
100
} . to_string ( )
101
- } )
102
- . to_string ( )
101
+ } ) . to_string ( )
103
102
}
104
103
105
104
#[ allow( unused) ]
@@ -139,8 +138,7 @@ pub fn backtrace_to_stacktrace(bt: &Backtrace) -> Option<Stacktrace> {
139
138
..Default :: default ( )
140
139
}
141
140
} )
142
- } )
143
- . collect ( ) ;
141
+ } ) . collect ( ) ;
144
142
Stacktrace :: from_frames_reversed ( frames)
145
143
}
146
144
@@ -176,8 +174,7 @@ where
176
174
} else {
177
175
None
178
176
}
179
- } )
180
- . next ( )
177
+ } ) . next ( )
181
178
} ;
182
179
let trunc = stacktrace. frames . len ( ) - cutoff - 1 ;
183
180
stacktrace. frames . truncate ( trunc) ;
Original file line number Diff line number Diff line change @@ -136,8 +136,7 @@ impl fmt::Debug for ClientOptions {
136
136
. field (
137
137
"before_send" ,
138
138
& BeforeBreadcrumbSet ( self . before_breadcrumb . is_some ( ) ) ,
139
- )
140
- . finish ( )
139
+ ) . finish ( )
141
140
}
142
141
}
143
142
@@ -339,7 +338,10 @@ impl Client {
339
338
}
340
339
341
340
#[ doc( hidden) ]
342
- #[ deprecated( since = "0.8.0" , note = "Please use Client::with_options instead" ) ]
341
+ #[ deprecated(
342
+ since = "0.8.0" ,
343
+ note = "Please use Client::with_options instead"
344
+ ) ]
343
345
pub fn with_dsn ( dsn : Dsn ) -> Client {
344
346
let mut options = ClientOptions :: default ( ) ;
345
347
options. dsn = Some ( dsn) ;
@@ -361,20 +363,29 @@ impl Client {
361
363
}
362
364
363
365
#[ doc( hidden) ]
364
- #[ deprecated( since = "0.8.0" , note = "Please use Client::with_options instead" ) ]
366
+ #[ deprecated(
367
+ since = "0.8.0" ,
368
+ note = "Please use Client::with_options instead"
369
+ ) ]
365
370
pub fn with_dsn_and_options ( dsn : Dsn , mut options : ClientOptions ) -> Client {
366
371
options. dsn = Some ( dsn) ;
367
372
Client :: with_options ( options)
368
373
}
369
374
370
375
#[ doc( hidden) ]
371
- #[ deprecated( since = "0.8.0" , note = "Please use Client::with_options instead" ) ]
376
+ #[ deprecated(
377
+ since = "0.8.0" ,
378
+ note = "Please use Client::with_options instead"
379
+ ) ]
372
380
pub fn disabled ( ) -> Client {
373
381
Client :: with_options ( Default :: default ( ) )
374
382
}
375
383
376
384
#[ doc( hidden) ]
377
- #[ deprecated( since = "0.8.0" , note = "Please use Client::with_options instead" ) ]
385
+ #[ deprecated(
386
+ since = "0.8.0" ,
387
+ note = "Please use Client::with_options instead"
388
+ ) ]
378
389
pub fn disabled_with_options ( options : ClientOptions ) -> Client {
379
390
Client {
380
391
options,
Original file line number Diff line number Diff line change @@ -79,8 +79,7 @@ fn parse_stacktrace(bt: &str) -> Option<Stacktrace> {
79
79
. map ( |x| x. as_str ( ) . parse :: < u64 > ( ) . unwrap ( ) ) ,
80
80
..Default :: default ( )
81
81
}
82
- } )
83
- . collect ( ) ;
82
+ } ) . collect ( ) ;
84
83
85
84
Stacktrace :: from_frames_reversed ( frames)
86
85
}
Original file line number Diff line number Diff line change @@ -211,7 +211,7 @@ impl HttpTransport {
211
211
dsn,
212
212
sender : Mutex :: new ( sender) ,
213
213
shutdown_signal,
214
- shutdown_immediately : shutdown_immediately ,
214
+ shutdown_immediately,
215
215
queue_size,
216
216
_handle,
217
217
}
Original file line number Diff line number Diff line change @@ -69,8 +69,7 @@ fn test_breadcrumbs() {
69
69
x. message . as_ref ( ) . map ( |x| x. as_str ( ) ) . unwrap ( ) ,
70
70
x. ty . as_str ( ) ,
71
71
)
72
- } )
73
- . collect ( ) ;
72
+ } ) . collect ( ) ;
74
73
assert_eq ! (
75
74
messages,
76
75
vec![
You can’t perform that action at this time.
0 commit comments