Skip to content

Commit

Permalink
Merge pull request #186 from brotskydotcom/master
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
brotskydotcom authored Jul 10, 2024
2 parents 60a7d3b + ff6f381 commit 808e8c7
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ keywords = ["password", "credential", "keychain", "keyring", "cross-platform"]
license = "MIT OR Apache-2.0"
name = "keyring"
repository = "https://github.com/hwchen/keyring-rs.git"
version = "3.0.0"
version = "3.0.1"
rust-version = "1.75"
edition = "2021"
exclude = [".github/"]
Expand Down Expand Up @@ -43,7 +43,7 @@ dbus-secret-service = { version = "4.0.0-rc.2", optional = true }
[target.'cfg(target_os = "freebsd")'.dependencies]
secret-service = { version = "4", optional = true }
zbus = { version = "4", optional = true }
dbus-secret-service = { version = "4.0.0-rc.1", optional = true }
dbus-secret-service = { version = "4.0.1", optional = true }

[target.'cfg(target_os = "openbsd")'.dependencies]
secret-service = { version = "4", optional = true }
Expand Down
4 changes: 2 additions & 2 deletions src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@ pub enum Error {
/// This indicates runtime failure in the underlying
/// platform storage system. The details of the failure can
/// be retrieved from the attached platform error.
PlatformFailure(Box<dyn std::error::Error + Send>),
PlatformFailure(Box<dyn std::error::Error + Send + Sync>),
/// This indicates that the underlying secure storage
/// holding saved items could not be accessed. Typically this
/// is because of access rules in the platform; for example, it
/// might be that the credential store is locked. The underlying
/// platform error will typically give the reason.
NoStorageAccess(Box<dyn std::error::Error + Send>),
NoStorageAccess(Box<dyn std::error::Error + Send + Sync>),
/// This indicates that there is no underlying credential
/// entry in the platform for this entry. Either one was
/// never set, or it was deleted.
Expand Down
2 changes: 1 addition & 1 deletion src/secret_service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,7 @@ fn no_access(err: Error) -> ErrorCode {
ErrorCode::NoStorageAccess(wrap(err))
}

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

Expand Down

0 comments on commit 808e8c7

Please sign in to comment.