ci: clippy on stable 1.96 and the Windows-only pre-existing failures
Three boolean expressions clippy now wants simplified (pipeline's normalize_wb, engine's learn_as_shot_wb, per nonminimal_bool), a descriptor_copy only its #[cfg(unix)] test calls (dead on Windows), and desktop_entries_give_their_program is unix-gated (Path::is_absolute decides by the platform, and desktop entries run there). None change behaviour; all four fail cargo xtask ci on this toolchain from main. Co-Authored-By: GLM 5.3 Flash <noreply@z.ai>
This commit is contained in:
parent
76b5377868
commit
39ff9f9bd5
|
|
@ -216,6 +216,8 @@ mod tests {
|
|||
assert_eq!(reg_value("ERROR: The system was unable to find the specified registry key or value."), None);
|
||||
}
|
||||
|
||||
/// (Unix: `Path::is_absolute` decides by the platform's rules, and desktop entries run there)
|
||||
#[cfg(unix)]
|
||||
#[test]
|
||||
fn desktop_entries_give_their_program() {
|
||||
let appimage = "[Desktop Entry]\nName=PhotoCraft\nExec=\"/home/simon/Apps/photocraft-1.2-linux-x86_64.AppImage\" %F\n";
|
||||
|
|
|
|||
|
|
@ -135,8 +135,9 @@ impl LibraryLock {
|
|||
}
|
||||
|
||||
/// Another descriptor on the locked file: what a process spawned by another thread holds
|
||||
/// between fork and exec (a `dup` refers to the same open file description). Tests only.
|
||||
#[cfg(test)]
|
||||
/// between fork and exec (a `dup` refers to the same open file description). Tests only (its
|
||||
/// only test stands in for a fork, which is Unix).
|
||||
#[cfg(all(test, unix))]
|
||||
pub(crate) fn descriptor_copy(&self) -> Option<File> {
|
||||
self.file.as_ref().and_then(|f| f.try_clone().ok())
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1391,7 +1391,7 @@ impl crate::Session {
|
|||
/// says and what a smart preview renders with. Only for raws edited in Kelvin.
|
||||
fn learn_as_shot_wb(&mut self, id: PhotoId, info: &SourceInfo) {
|
||||
let Some(p) = self.catalog.photo(id) else { return };
|
||||
if !(info.raw && !info.relative_wb && p.develops_raw() && !p.relative_wb()) {
|
||||
if !info.raw || info.relative_wb || !p.develops_raw() || p.relative_wb() {
|
||||
return;
|
||||
}
|
||||
let read = (info.as_shot_temp, info.as_shot_tint);
|
||||
|
|
|
|||
|
|
@ -147,7 +147,7 @@ pub fn legacy_to_kelvin(temp: f64, tint: f64, as_shot: (f64, f64)) -> (f64, f64)
|
|||
/// edited on a rendered photo or a raw without matrices never pass for Kelvin when pasted onto one that has them.
|
||||
pub fn normalize_wb(d: &mut DevelopSettings, info: &SourceInfo) {
|
||||
use lightcraft_develop::{WbMode, WbScale};
|
||||
if !(info.raw && !info.relative_wb) {
|
||||
if !info.raw || info.relative_wb {
|
||||
d.wb.scale = WbScale::Legacy;
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue