Skip to content

Commit b00bbde

Browse files
dbus: Don't cache locked status
Was found through a test, but that requires prompting so not useful for now
1 parent 6967843 commit b00bbde

3 files changed

Lines changed: 13 additions & 8 deletions

File tree

client/src/dbus/api/collection.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ impl<'a> Collection<'a> {
4141
{
4242
zbus::proxy::Builder::new(connection)
4343
.path(object_path)?
44-
.uncached_properties(&["Label", "Modified", "Items"])
44+
.uncached_properties(&["Label", "Modified", "Items", "Locked"])
4545
.build()
4646
.await
4747
.map_err(From::from)

client/src/dbus/api/item.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ impl<'a> Item<'a> {
3737
{
3838
zbus::proxy::Builder::new(connection)
3939
.path(object_path)?
40-
.uncached_properties(&["Label", "Attributes", "Modified"])
40+
.uncached_properties(&["Label", "Attributes", "Modified", "Locked"])
4141
.build()
4242
.await
4343
.map_err(From::from)

client/src/secret.rs

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ impl AsRef<[u8]> for Secret {
181181

182182
#[cfg(test)]
183183
mod tests {
184-
use zvariant::{serialized::Context, to_bytes, Endian};
184+
use zvariant::{Endian, serialized::Context, to_bytes};
185185

186186
use super::*;
187187

@@ -222,15 +222,20 @@ mod tests {
222222
let encoded = to_bytes(ctxt, &"invalid/type").unwrap();
223223
let result: Result<(ContentType, _), _> = encoded.deserialize();
224224
assert!(result.is_err());
225-
assert!(result
226-
.unwrap_err()
227-
.to_string()
228-
.contains("Invalid content type"));
225+
assert!(
226+
result
227+
.unwrap_err()
228+
.to_string()
229+
.contains("Invalid content type")
230+
);
229231
}
230232

231233
#[test]
232234
fn content_type_from_str() {
233-
assert_eq!(ContentType::from_str("text/plain").unwrap(), ContentType::Text);
235+
assert_eq!(
236+
ContentType::from_str("text/plain").unwrap(),
237+
ContentType::Text
238+
);
234239
assert_eq!(
235240
ContentType::from_str("application/octet-stream").unwrap(),
236241
ContentType::Blob

0 commit comments

Comments
 (0)