Clear clippy 1.97 lints across bread-theme, bread-utils, bread-polkit
Toolchain drift (clippy 0.1.97): pre-existing on main, all mechanical and behaviour-preserving. - bread-theme/gtk.rs: `type AppCssBuilder` alias for the repeated `Rc<dyn Fn(&Palette) -> String>` (type_complexity ×4). - bread-theme/lib.rs: `sort_by_key(|..| Reverse(len))` (unnecessary_sort_by). - bread-theme/output.rs: `io::Error::other`; struct-init in a test. - bread-utils/singleton.rs: explicit `.truncate(false)` on the lock file open — we only clear it after winning the lock (suspicious_open_options). - bread-polkit/identity.rs: elide `pick_user` lifetimes.
This commit is contained in:
parent
6d9912af56
commit
a86c31291b
5 changed files with 24 additions and 15 deletions
|
|
@ -80,6 +80,9 @@ pub fn try_acquire(app: &str) -> std::io::Result<Acquire> {
|
|||
.read(true)
|
||||
.write(true)
|
||||
.create(true)
|
||||
// Never truncate on open: an existing lock file may be held by a live
|
||||
// instance. We only clear it (`set_len(0)`) *after* winning the lock.
|
||||
.truncate(false)
|
||||
.open(&path)?;
|
||||
|
||||
match file.try_lock() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue