Skip to content

Commit 8ea59c8

Browse files
jan-auermitsuhiko
authored andcommitted
build: Upgrade rust to 1.29.0 (getsentry#83)
1 parent 05e5f83 commit 8ea59c8

File tree

11 files changed

+36
-27
lines changed

11 files changed

+36
-27
lines changed

.travis.yml

-3
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,7 @@ env: # Needed for allow_failures
1717
matrix:
1818
include:
1919
- env: SUITE=format-check
20-
install: rustup component add rustfmt-preview
2120
- env: SUITE=lint
22-
install: rustup component add clippy-preview
23-
rust: nightly
2421
- env: SUITE=check
2522
rust: "1.28.0"
2623
- env: SUITE=cargotest

Makefile

+3-1
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,11 @@ test: checkall cargotestall
7373
.PHONY: test
7474

7575
format-check:
76+
@rustup component add rustfmt-preview 2> /dev/null
7677
@cargo fmt -- --check
7778
.PHONY: format-check
7879

7980
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
8183
.PHONY: lint

examples/failure-demo.rs

+5-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,11 @@ extern crate sentry;
77
use sentry::integrations::failure::capture_error;
88

99
#[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+
)]
1115
struct MyError {
1216
code: i32,
1317
message: String,

examples/thread-demo.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ fn main() {
5050
error!("Failing!");
5151
});
5252
}).join()
53-
.unwrap();
54-
}).join()
5553
.unwrap();
54+
}).join()
55+
.unwrap();
5656
}

integrations/sentry-actix/examples/basic.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,6 @@ fn main() {
2222
.middleware(SentryMiddleware::builder().emit_header(true).finish())
2323
.resource("/", |r| r.f(failing))
2424
}).bind("127.0.0.1:3001")
25-
.unwrap()
26-
.run();
25+
.unwrap()
26+
.run();
2727
}

integrations/sentry-actix/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ fn extract_request<S: 'static>(
181181
req.connection_info().host(),
182182
req.uri()
183183
).parse()
184-
.ok(),
184+
.ok(),
185185
method: Some(req.method().to_string()),
186186
headers: req
187187
.headers()

src/backtrace_support.rs

+3-6
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,7 @@ pub fn demangle_symbol(s: &str) -> String {
9898
"u22" => "\"",
9999
_ => unreachable!(),
100100
}.to_string()
101-
})
102-
.to_string()
101+
}).to_string()
103102
}
104103

105104
#[allow(unused)]
@@ -139,8 +138,7 @@ pub fn backtrace_to_stacktrace(bt: &Backtrace) -> Option<Stacktrace> {
139138
..Default::default()
140139
}
141140
})
142-
})
143-
.collect();
141+
}).collect();
144142
Stacktrace::from_frames_reversed(frames)
145143
}
146144

@@ -176,8 +174,7 @@ where
176174
} else {
177175
None
178176
}
179-
})
180-
.next()
177+
}).next()
181178
};
182179
let trunc = stacktrace.frames.len() - cutoff - 1;
183180
stacktrace.frames.truncate(trunc);

src/client.rs

+17-6
Original file line numberDiff line numberDiff line change
@@ -136,8 +136,7 @@ impl fmt::Debug for ClientOptions {
136136
.field(
137137
"before_send",
138138
&BeforeBreadcrumbSet(self.before_breadcrumb.is_some()),
139-
)
140-
.finish()
139+
).finish()
141140
}
142141
}
143142

@@ -339,7 +338,10 @@ impl Client {
339338
}
340339

341340
#[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+
)]
343345
pub fn with_dsn(dsn: Dsn) -> Client {
344346
let mut options = ClientOptions::default();
345347
options.dsn = Some(dsn);
@@ -361,20 +363,29 @@ impl Client {
361363
}
362364

363365
#[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+
)]
365370
pub fn with_dsn_and_options(dsn: Dsn, mut options: ClientOptions) -> Client {
366371
options.dsn = Some(dsn);
367372
Client::with_options(options)
368373
}
369374

370375
#[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+
)]
372380
pub fn disabled() -> Client {
373381
Client::with_options(Default::default())
374382
}
375383

376384
#[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+
)]
378389
pub fn disabled_with_options(options: ClientOptions) -> Client {
379390
Client {
380391
options,

src/integrations/failure.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,7 @@ fn parse_stacktrace(bt: &str) -> Option<Stacktrace> {
7979
.map(|x| x.as_str().parse::<u64>().unwrap()),
8080
..Default::default()
8181
}
82-
})
83-
.collect();
82+
}).collect();
8483

8584
Stacktrace::from_frames_reversed(frames)
8685
}

src/transport.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ impl HttpTransport {
211211
dsn,
212212
sender: Mutex::new(sender),
213213
shutdown_signal,
214-
shutdown_immediately: shutdown_immediately,
214+
shutdown_immediately,
215215
queue_size,
216216
_handle,
217217
}

tests/test_basic.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,7 @@ fn test_breadcrumbs() {
6969
x.message.as_ref().map(|x| x.as_str()).unwrap(),
7070
x.ty.as_str(),
7171
)
72-
})
73-
.collect();
72+
}).collect();
7473
assert_eq!(
7574
messages,
7675
vec![

0 commit comments

Comments
 (0)