Skip to content

Commit 463093b

Browse files
Swatinemmarcusirgenstimfish
authored
Apply clippy fixes and cherry-pick PRs (#610)
- Bump webpki-roots to ^0.25.1 - `debug-images` should be listed as a default feature - Apply clippy suggestions and bump MSRV --------- Co-authored-by: Marcus Pettersen Irgens <[email protected]> Co-authored-by: Tim Fish <[email protected]>
1 parent 6ef6d97 commit 463093b

File tree

23 files changed

+33
-33
lines changed

23 files changed

+33
-33
lines changed

.github/workflows/ci.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ jobs:
6565
fail-fast: false
6666
matrix:
6767
os: [ubuntu-latest, macos-latest, windows-latest]
68-
rust: [1.66.0]
68+
rust: [1.67.0]
6969

7070
name: Check / Test MSRV on ${{ matrix.os }}
7171
runs-on: ${{ matrix.os }}

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -93,12 +93,12 @@ best API and adding new features.
9393
We currently only verify this crate against a recent version of Sentry hosted on [sentry.io](https://sentry.io/) but it
9494
should work with on-prem Sentry versions 20.6 and later.
9595

96-
The **Minimum Supported Rust Version** is currently at _1.66.0_.
96+
The **Minimum Supported Rust Version** is currently at _1.67.0_.
9797
The Sentry crates will support a _6 months_ old Rust version at time of release,
9898
and the MSRV will be increased in accordance with its dependencies.
9999

100100
**Note**: Due to the misconfiguration in our workflow that verified the MSRV builds,
101-
we had to bump it all the way to _1.66.0_, breaking our own _6 months_ old rule.
101+
we had to bump it all the way to _1.67.0_, breaking our own _6 months_ old rule.
102102
As of version _0.30.0_, the workflow has been fixed, and the MSRV will be enforced correctly.
103103

104104
## Resources

clippy.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
msrv = "1.66.0"
1+
msrv = "1.67.0"

sentry-actix/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ description = """
1010
Sentry client extension for actix-web 3.
1111
"""
1212
edition = "2021"
13-
rust-version = "1.66"
13+
rust-version = "1.67"
1414

1515
[dependencies]
1616
actix-web = { version = "4", default-features = false }

sentry-anyhow/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ description = """
1010
Sentry integration for anyhow.
1111
"""
1212
edition = "2021"
13-
rust-version = "1.66"
13+
rust-version = "1.67"
1414

1515
[features]
1616
default = ["backtrace"]

sentry-backtrace/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ description = """
1010
Sentry integration and utilities for dealing with stacktraces.
1111
"""
1212
edition = "2021"
13-
rust-version = "1.66"
13+
rust-version = "1.67"
1414

1515
[dependencies]
1616
backtrace = "0.3.44"

sentry-backtrace/src/utils.rs

+6-6
Original file line numberDiff line numberDiff line change
@@ -14,34 +14,34 @@ static HASH_FUNC_RE: Lazy<Regex> = Lazy::new(|| {
1414

1515
static CRATE_HASH_RE: Lazy<Regex> = Lazy::new(|| {
1616
Regex::new(
17-
r#"(?x)
17+
r"(?x)
1818
\b(\[[a-f0-9]{16}\])
19-
"#,
19+
",
2020
)
2121
.unwrap()
2222
});
2323

2424
static CRATE_RE: Lazy<Regex> = Lazy::new(|| {
2525
Regex::new(
26-
r#"(?x)
26+
r"(?x)
2727
^
2828
(?:_?<)? # trait impl syntax
2929
(?:\w+\ as \ )? # anonymous implementor
3030
([a-zA-Z0-9_]+?) # crate name
3131
(?:\.\.|::|\[) # crate delimiter (.. or :: or [)
32-
"#,
32+
",
3333
)
3434
.unwrap()
3535
});
3636

3737
static COMMON_RUST_SYMBOL_ESCAPES_RE: Lazy<Regex> = Lazy::new(|| {
3838
Regex::new(
39-
r#"(?x)
39+
r"(?x)
4040
\$
4141
(SP|BP|RF|LT|GT|LP|RP|C|
4242
u7e|u20|u27|u5b|u5d|u7b|u7d|u3b|u2b|u22)
4343
\$
44-
"#,
44+
",
4545
)
4646
.unwrap()
4747
});

sentry-contexts/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Sentry integration for os, device, and rust contexts.
1111
"""
1212
build = "build.rs"
1313
edition = "2021"
14-
rust-version = "1.66"
14+
rust-version = "1.67"
1515

1616
[dependencies]
1717
sentry-core = { version = "0.31.5", path = "../sentry-core" }

sentry-core/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ description = """
1010
Core sentry library used for instrumentation and integration development.
1111
"""
1212
edition = "2021"
13-
rust-version = "1.66"
13+
rust-version = "1.67"
1414

1515
[package.metadata.docs.rs]
1616
all-features = true

sentry-debug-images/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ description = """
1010
Sentry integration that adds the list of loaded libraries to events.
1111
"""
1212
edition = "2021"
13-
rust-version = "1.66"
13+
rust-version = "1.67"
1414

1515
[dependencies]
1616
findshlibs = "=0.10.2"

sentry-log/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ description = """
1010
Sentry integration for log and env_logger crates.
1111
"""
1212
edition = "2021"
13-
rust-version = "1.66"
13+
rust-version = "1.67"
1414

1515
[dependencies]
1616
sentry-core = { version = "0.31.5", path = "../sentry-core" }

sentry-panic/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ description = """
1010
Sentry integration for capturing panics.
1111
"""
1212
edition = "2021"
13-
rust-version = "1.66"
13+
rust-version = "1.67"
1414

1515
[dependencies]
1616
sentry-core = { version = "0.31.5", path = "../sentry-core" }

sentry-slog/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ description = """
1010
Sentry integration for the slog crate.
1111
"""
1212
edition = "2021"
13-
rust-version = "1.66"
13+
rust-version = "1.67"
1414

1515
[dependencies]
1616
sentry-core = { version = "0.31.5", path = "../sentry-core" }

sentry-tower/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ description = """
1010
Sentry integration for tower-based crates.
1111
"""
1212
edition = "2021"
13-
rust-version = "1.66"
13+
rust-version = "1.67"
1414

1515
[features]
1616
http = ["dep:http", "pin-project", "url"]

sentry-tracing/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ description = """
1010
Sentry integration for tracing and tracing-subscriber crates.
1111
"""
1212
edition = "2021"
13-
rust-version = "1.66"
13+
rust-version = "1.67"
1414

1515
[features]
1616
default = []

sentry-types/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Common reusable types for implementing the sentry.io protocol.
1111
"""
1212
keywords = ["sentry", "protocol"]
1313
edition = "2021"
14-
rust-version = "1.66"
14+
rust-version = "1.67"
1515

1616
[package.metadata.docs.rs]
1717
all-features = true

sentry-types/tests/test_auth.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ fn test_auth_from_iterator() {
5353
cont.insert("sentry_client", "raven-js/3.23.3");
5454
cont.insert("sentry_key", "4bb5d94de752a36b8b87851a3f82726a");
5555

56-
let auth = Auth::from_pairs(cont.into_iter()).unwrap();
56+
let auth = Auth::from_pairs(cont).unwrap();
5757
assert_eq!(auth.timestamp(), None);
5858
assert_eq!(auth.client_agent(), Some("raven-js/3.23.3"));
5959
assert_eq!(auth.version(), 7);
@@ -90,7 +90,7 @@ fn test_auth_to_json() {
9090
cont.insert("sentry_client", "raven-js/3.23.3");
9191
cont.insert("sentry_key", "4bb5d94de752a36b8b87851a3f82726a");
9292

93-
let auth = Auth::from_pairs(cont.into_iter()).unwrap();
93+
let auth = Auth::from_pairs(cont).unwrap();
9494
assert_eq!(
9595
serde_json::to_string(&auth).expect("could not serialize").as_str(),
9696
"{\"sentry_client\":\"raven-js/3.23.3\",\"sentry_version\":7,\"sentry_key\":\"4bb5d94de752a36b8b87851a3f82726a\",\"sentry_secret\":null}"

sentry/Cargo.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ description = """
1010
Sentry (getsentry.com) client for rust ;)
1111
"""
1212
edition = "2021"
13-
rust-version = "1.66"
13+
rust-version = "1.67"
1414
autoexamples = true
1515

1616
# To build locally:
@@ -73,7 +73,7 @@ tokio = { version = "1.0", features = ["rt"], optional = true }
7373
ureq = { version = "2.7.0", optional = true, default-features = false }
7474
native-tls = { version = "0.2.8", optional = true }
7575
rustls = { version = "0.21.2", optional = true, features = ["dangerous_configuration"] }
76-
webpki-roots = { version = "0.23.0", optional = true }
76+
webpki-roots = { version = "0.25.1", optional = true }
7777

7878
[dev-dependencies]
7979
sentry-anyhow = { path = "../sentry-anyhow" }

sentry/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ extra setup to function properly.
7373
| `transport` || | | |
7474
| `anyhow` | | 🔌 | | |
7575
| `test` | | | | |
76-
| `debug-images` | | 🔌 | | |
76+
| `debug-images` | | 🔌 | | |
7777
| `log` | | 🔌 | | Requires extra setup; See [`sentry-log`]'s documentation. |
7878
| `debug-logs` | | || Requires extra setup; See [`sentry-log`]'s documentation. |
7979
| `slog` | | 🔌 | | Requires extra setup; See [`sentry-slog`]'s documentation. |
@@ -95,11 +95,11 @@ extra setup to function properly.
9595
- `contexts`: Enables capturing device, OS, and Rust contexts.
9696
- `panic`: Enables support for capturing panics.
9797
- `transport`: Enables the default transport, which is currently `reqwest` with `native-tls`.
98+
- `debug-images`: Enables capturing metadata about the loaded shared libraries.
9899

99100
### Debugging/Testing
100101
- `anyhow`: Enables support for the `anyhow` crate.
101102
- `test`: Enables testing support.
102-
- `debug-images`: Attaches a list of loaded libraries to events (currently only supported on Unix).
103103

104104
### Logging
105105
- `log`: Enables support for the `log` crate.

sentry/src/defaults.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ pub fn apply_defaults(mut opts: ClientOptions) -> ClientOptions {
7474
{
7575
integrations.push(Arc::new(sentry_backtrace::ProcessStacktraceIntegration));
7676
}
77-
integrations.extend(opts.integrations.into_iter());
77+
integrations.extend(opts.integrations);
7878
opts.integrations = integrations;
7979
}
8080
if opts.dsn.is_none() {

sentry/src/lib.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
//! | `transport` | ✅ | | | |
6666
//! | `anyhow` | | 🔌 | | |
6767
//! | `test` | | | | |
68-
//! | `debug-images` | | 🔌 | | |
68+
//! | `debug-images` | | 🔌 | | |
6969
//! | `log` | | 🔌 | | Requires extra setup; See [`sentry-log`]'s documentation. |
7070
//! | `debug-logs` | | | ❗ | Requires extra setup; See [`sentry-log`]'s documentation. |
7171
//! | `slog` | | 🔌 | | Requires extra setup; See [`sentry-slog`]'s documentation. |
@@ -87,11 +87,11 @@
8787
//! - `contexts`: Enables capturing device, OS, and Rust contexts.
8888
//! - `panic`: Enables support for capturing panics.
8989
//! - `transport`: Enables the default transport, which is currently `reqwest` with `native-tls`.
90+
//! - `debug-images`: Enables capturing metadata about the loaded shared libraries.
9091
//!
9192
//! ## Debugging/Testing
9293
//! - `anyhow`: Enables support for the `anyhow` crate.
9394
//! - `test`: Enables testing support.
94-
//! - `debug-images`: Attaches a list of loaded libraries to events (currently only supported on Unix).
9595
//!
9696
//! ## Logging
9797
//! - `log`: Enables support for the `log` crate.

sentry/src/transports/surf.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ impl SurfHttpTransport {
3232
}
3333

3434
fn new_internal(options: &ClientOptions, client: Option<SurfClient>) -> Self {
35-
let mut client = client.unwrap_or_else(SurfClient::new);
35+
let mut client = client.unwrap_or_default();
3636
if options.accept_invalid_certs {
3737
let hc = HttpClient::builder()
3838
.ssl_options(SslOption::DANGER_ACCEPT_INVALID_CERTS)

sentry/src/transports/ureq.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ impl UreqHttpTransport {
7474
}
7575

7676
let mut root_store = RootCertStore::empty();
77-
root_store.add_server_trust_anchors(TLS_SERVER_ROOTS.0.iter().map(|ta| {
77+
root_store.add_trust_anchors(TLS_SERVER_ROOTS.iter().map(|ta| {
7878
OwnedTrustAnchor::from_subject_spki_name_constraints(
7979
ta.subject,
8080
ta.spki,

0 commit comments

Comments
 (0)