Skip to content

Commit 808e8c7

Browse files
Merge pull request #186 from brotskydotcom/master
Release v3.0.1 Primary change: Make errors be Send + Sync. This is what they were in v2, and it's required by anyhow. Fixes #185. Also updates dbus-secret-service dependency.
2 parents 60a7d3b + ff6f381 commit 808e8c7

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

Cargo.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ keywords = ["password", "credential", "keychain", "keyring", "cross-platform"]
66
license = "MIT OR Apache-2.0"
77
name = "keyring"
88
repository = "https://github.com/hwchen/keyring-rs.git"
9-
version = "3.0.0"
9+
version = "3.0.1"
1010
rust-version = "1.75"
1111
edition = "2021"
1212
exclude = [".github/"]
@@ -43,7 +43,7 @@ dbus-secret-service = { version = "4.0.0-rc.2", optional = true }
4343
[target.'cfg(target_os = "freebsd")'.dependencies]
4444
secret-service = { version = "4", optional = true }
4545
zbus = { version = "4", optional = true }
46-
dbus-secret-service = { version = "4.0.0-rc.1", optional = true }
46+
dbus-secret-service = { version = "4.0.1", optional = true }
4747

4848
[target.'cfg(target_os = "openbsd")'.dependencies]
4949
secret-service = { version = "4", optional = true }

src/error.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,13 @@ pub enum Error {
2525
/// This indicates runtime failure in the underlying
2626
/// platform storage system. The details of the failure can
2727
/// be retrieved from the attached platform error.
28-
PlatformFailure(Box<dyn std::error::Error + Send>),
28+
PlatformFailure(Box<dyn std::error::Error + Send + Sync>),
2929
/// This indicates that the underlying secure storage
3030
/// holding saved items could not be accessed. Typically this
3131
/// is because of access rules in the platform; for example, it
3232
/// might be that the credential store is locked. The underlying
3333
/// platform error will typically give the reason.
34-
NoStorageAccess(Box<dyn std::error::Error + Send>),
34+
NoStorageAccess(Box<dyn std::error::Error + Send + Sync>),
3535
/// This indicates that there is no underlying credential
3636
/// entry in the platform for this entry. Either one was
3737
/// never set, or it was deleted.

src/secret_service.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -470,7 +470,7 @@ fn no_access(err: Error) -> ErrorCode {
470470
ErrorCode::NoStorageAccess(wrap(err))
471471
}
472472

473-
fn wrap(err: Error) -> Box<dyn std::error::Error + Send> {
473+
fn wrap(err: Error) -> Box<dyn std::error::Error + Send + Sync> {
474474
Box::new(err)
475475
}
476476

0 commit comments

Comments
 (0)