Skip to content

Commit e7a3774

Browse files
committed
ref: Rename sentry_crate_release to sentry::release_name
1 parent 0bf4d02 commit e7a3774

File tree

6 files changed

+15
-13
lines changed

6 files changed

+15
-13
lines changed

examples/error-chain-demo.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
use sentry::sentry_crate_release;
21
use sentry::integrations::error_chain::capture_error_chain;
32

43
error_chain::error_chain! {
@@ -21,7 +20,7 @@ fn main() {
2120
.parse()
2221
.unwrap(),
2322
),
24-
release: sentry_crate_release!(),
23+
release: sentry::release_name!(),
2524
..Default::default()
2625
});
2726

examples/failure-demo.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
use failure::Fail;
2-
use sentry::sentry_crate_release;
32
use sentry::integrations::failure::capture_error;
43

54
#[derive(Fail, Debug)]
@@ -21,7 +20,7 @@ fn main() {
2120
let _sentry = sentry::init((
2221
"https://a94ae32be2584e0bbd7a4cbb95971fee@sentry.io/1041156",
2322
sentry::ClientOptions {
24-
release: sentry_crate_release!(),
23+
release: sentry::release_name!(),
2524
..Default::default()
2625
},
2726
));

examples/log-demo.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
use log::{debug, error, info, warn};
2-
use sentry::sentry_crate_release;
32

43
fn main() {
54
let _sentry = sentry::init((
65
"https://a94ae32be2584e0bbd7a4cbb95971fee@sentry.io/1041156",
76
sentry::ClientOptions {
8-
release: sentry_crate_release!(),
7+
release: sentry::release_name!(),
98
..Default::default()
109
},
1110
));

examples/panic-demo.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
1-
use sentry::sentry_crate_release;
2-
31
fn main() {
42
let _sentry = sentry::init((
53
"https://a94ae32be2584e0bbd7a4cbb95971fee@sentry.io/1041156",
64
sentry::ClientOptions {
7-
release: sentry_crate_release!(),
5+
release: sentry::release_name!(),
86
..Default::default()
97
},
108
));

examples/thread-demo.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,14 @@
11
use std::sync::Arc;
22
use std::thread;
33

4-
use sentry::sentry_crate_release;
5-
64
fn main() {
75
// this initializes sentry. It also gives the thread that calls this some
86
// special behavior in that all other threads spawned will get a hub based on
97
// the hub from here.
108
let _sentry = sentry::init((
119
"https://a94ae32be2584e0bbd7a4cbb95971fee@sentry.io/1041156",
1210
sentry::ClientOptions {
13-
release: sentry_crate_release!(),
11+
release: sentry::release_name!(),
1412
..Default::default()
1513
},
1614
));

src/macros.rs

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
/// the information supplied by cargo to calculate a release.
55
#[macro_export]
66
#[cfg(feature = "with_client_implementation")]
7-
macro_rules! sentry_crate_release {
7+
macro_rules! release_name {
88
() => {{
99
use std::sync::{Once, ONCE_INIT};
1010
static mut INIT: Once = ONCE_INIT;
@@ -23,6 +23,15 @@ macro_rules! sentry_crate_release {
2323
}};
2424
}
2525

26+
#[macro_export]
27+
#[cfg(feature = "with_client_implementation")]
28+
#[deprecated(since = "0.13.0", note = "use sentry::release_name! instead")]
29+
macro_rules! sentry_crate_release {
30+
() => {
31+
::sentry::release_name!()
32+
};
33+
}
34+
2635
macro_rules! with_client_impl {
2736
($body:block) => {
2837
#[cfg(feature = "with_client_implementation")]

0 commit comments

Comments
 (0)