Skip to content

Fix CI: desktop tests use std::slice::from_ref (clippy 1.100) - #460

Merged
WARR-eV merged 3 commits into
mainfrom
fix-ci
Nov 22, 2026
Merged

WARR-eV merged 3 commits into
mainfrom
fix-ci

Conversation

@rudalabs

Copy link
Copy Markdown
Collaborator

The desktop jobs on main (45f54c0) fail in clippy: clippy 1.100 refuses &[x.clone()] for a one-element slice (cloned_ref_to_slice_refs), five places in the tests of desktop/src/localchanges.rs (#416). They use std::slice::from_ref(&x) now (rustfmt layout). CHANGELOG entry under 0.2.13 Fixed.

This branch sits on the 0.2.13 version bump (d855a9a, the commit of the draft #458), so merging it also brings that bump; #458 can then be closed.

🤖 Generated with Claude Code

rudalabs and others added 3 commits November 22, 2026 22:30
Version 0.2.13 in Cargo.toml, desktop/Cargo.toml, desktop/tauri.conf.json
and the book's doxygen.js; both lock files follow (workspace packages
only). CHANGELOG: the Unreleased entries become 0.2.13 (2026-11-22),
compare links added. Upgrade guide: row v0.2.12 -> v0.2.13 (migration
0078, file_versions.properties). CLAUDE.md names the current version.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
clippy 1.100 refuses &[x.clone()] for a one-element slice
(cloned_ref_to_slice_refs); five places in the tests of
desktop/src/localchanges.rs (#416) failed the desktop jobs on main.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
index 396c60a..d124e04 100755
--- a/src/services/thumbnails.rs
+++ b/src/services/thumbnails.rs
@@ -41,7 +41,7 @@ pub fn rank(format: &str) -> Option<u8> {
 /// The file whose picture stands for a revision: the best [`rank`], the
 /// first by name (case-insensitive) on a tie. `key` gives a file's stored
 /// format id and its name.
-pub fn pick_main<'a, T>(files: &'a [T], key: impl Fn(&T) -> (&str, &str)) -> Option<&'a T> {
+pub fn pick_main<T>(files: &[T], key: impl Fn(&T) -> (&str, &str)) -> Option<&T> {
     files
         .iter()
         .filter_map(|f| {
@WARR-eV
WARR-eV merged commit 309a06b into main Nov 22, 2026
29 checks passed
@WARR-eV
WARR-eV deleted the fix-ci branch November 22, 2026 22:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants