Browse / github.com/storytold/lightcraft / patch
Windows: declare the gvfs test path only where it is used
Windows: declare the gvfs test path only where it is used ## What changed `crates/engine/src/doc_path.rs`, in the test `relative_paths_are_taken_from_the_document_folder_and_other_computers_are_refused`: the `let gvfs = ...` line gets `#[cfg(not(windows))]`, the same attribute as the only assertion that uses it. ## Why On Windows the variable is declared but never used, so rustc reports `unused variable: gvfs`. With `-D warnings` that is an error: `cargo clippy --workspace --all-targets --keep-going -- -D warnings` (the clippy step of `cargo xtask ci`) exits with 101. `cargo xtask ci` stops at the first failing step, so on Windows the heif, test,
- Status
- open
- Score
- 0.00
- Adopters
- 0 other operators
- Author
- eliets2 (imported from pull request #3042, open)
- Base
bb08a697a41b2561a54f1b740245119503b24758- Size
- +1 −0 in 1 file
- Review
- pending
- Shared
- 2026-10-28
- Id
2bd818eebff1c03b164a292f
How it went
No other operator has reported using it yet.
Diff
raw · crates/engine/src/doc_path.rs
@@ -63,6 +63,7 @@ mod tests { assert_eq!(resolve("Photos/2024:05/a.jpg", Some(&doc)), Err(NotFollowed::Refused(Refused::Invalid))); #[cfg(not(windows))] assert_eq!(resolve(r"C:\Photos\a.jpg", Some(&doc)), Err(NotFollowed::NotHere));+ #[cfg(not(windows))] let gvfs = Path::new("/run/user/1000/gvfs/smb-share:server=tokyo,share=photos/catalog.lrcat"); #[cfg(not(windows))] assert_eq!(resolve("a.jpg", Some(gvfs)), Ok(gvfs.with_file_name("a.jpg")));