Skip to content

Commit

Permalink
Update zbus to v5
Browse files Browse the repository at this point in the history
  • Loading branch information
liff committed Nov 1, 2024
1 parent 5166f28 commit 8f87fdb
Show file tree
Hide file tree
Showing 10 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ num = "0.4.0"
rand = "0.8.1"
serde = { version = "1.0.103", features = ["derive"] }
sha2 = { version = "0.10.0", optional = true }
zbus = { version = "4", default-features = false }
zbus = { version = "5", default-features = false, features = [ "blocking-api" ] }
openssl = { version = "^0.10.40", optional = true }

[dev-dependencies]
Expand Down
2 changes: 1 addition & 1 deletion src/blocking/collection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ use crate::util::{exec_prompt_blocking, format_secret, lock_or_unlock_blocking,

use std::collections::HashMap;
use zbus::{
proxy::CacheProperties,
zvariant::{Dict, ObjectPath, OwnedObjectPath, Value},
CacheProperties,
};

// Collection struct.
Expand Down
2 changes: 1 addition & 1 deletion src/blocking/item.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ use crate::ss::SS_DBUS_NAME;
use crate::util::{exec_prompt_blocking, format_secret, lock_or_unlock_blocking, LockAction};

use std::collections::HashMap;
use zbus::{zvariant::OwnedObjectPath, CacheProperties};
use zbus::{proxy::CacheProperties, zvariant::OwnedObjectPath};

pub struct Item<'a> {
conn: zbus::blocking::Connection,
Expand Down
2 changes: 1 addition & 1 deletion src/collection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ use crate::Item;

use std::collections::HashMap;
use zbus::{
proxy::CacheProperties,
zvariant::{Dict, ObjectPath, OwnedObjectPath, Value},
CacheProperties,
};

// Collection struct.
Expand Down
2 changes: 1 addition & 1 deletion src/item.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ use crate::ss::SS_DBUS_NAME;
use crate::util::{exec_prompt, format_secret, lock_or_unlock, LockAction};

use std::collections::HashMap;
use zbus::{zvariant::OwnedObjectPath, CacheProperties};
use zbus::{proxy::CacheProperties, zvariant::OwnedObjectPath};

pub struct Item<'a> {
conn: zbus::Connection,
Expand Down
2 changes: 1 addition & 1 deletion src/proxy/collection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ use super::SecretStruct;
interface = "org.freedesktop.Secret.Collection",
default_service = "org.freedesktop.Secret.Collection"
)]
trait Collection {
pub trait Collection {
/// Returns prompt: ObjectPath
fn delete(&self) -> zbus::Result<OwnedObjectPath>;

Expand Down
2 changes: 1 addition & 1 deletion src/proxy/item.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ use super::SecretStruct;
interface = "org.freedesktop.Secret.Item",
default_service = "org.freedesktop.Secret.Item"
)]
trait Item {
pub trait Item {
fn delete(&self) -> zbus::Result<OwnedObjectPath>;

/// returns `Secret`
Expand Down
2 changes: 1 addition & 1 deletion src/proxy/prompt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ use zbus::zvariant::Value;
interface = "org.freedesktop.Secret.Prompt",
default_service = "org.freedesktop.Secret.Prompt"
)]
trait Prompt {
pub trait Prompt {
fn prompt(&self, window_id: &str) -> zbus::Result<()>;

fn dismiss(&self) -> zbus::Result<()>;
Expand Down
2 changes: 1 addition & 1 deletion src/proxy/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ use zbus::zvariant::{ObjectPath, OwnedObjectPath, OwnedValue, Type, Value};
default_service = "org.freedesktop.secrets",
default_path = "/org/freedesktop/secrets"
)]
trait Service {
pub trait Service {
fn open_session(&self, algorithm: &str, input: Value<'_>) -> zbus::Result<OpenSessionResult>;

fn create_collection(
Expand Down
2 changes: 1 addition & 1 deletion src/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ use crate::ss::SS_DBUS_NAME;
use rand::{rngs::OsRng, Rng};
use zbus::export::ordered_stream::OrderedStreamExt;
use zbus::{
proxy::CacheProperties,
zvariant::{self, ObjectPath},
CacheProperties,
};

// Helper enum for locking
Expand Down

0 comments on commit 8f87fdb

Please sign in to comment.