mirror of
https://github.com/storytold/photocraft.git
synced 2026-10-28 17:16:57 +01:00
fix(engine): simplify displacement map predicate for strict Clippy
This commit is contained in:
1 parent
b165afc332
commit
8df3ffd307
1 file changed
+1
-1
@@ -486,7 +486,7 @@ pub(crate) fn map_path(p: &Value) -> Option<&str> {
|
||||
/// Displace's `mapDocument`: an index or a name. Null and a negative index (the dialog's "None")
|
||||
/// name no document.
|
||||
pub(crate) fn map_document(p: &Value) -> Option<&Value> {
|
||||
p.get("mapDocument").filter(|d| !d.is_null() && !d.as_i64().is_some_and(|i| i < 0))
|
||||
p.get("mapDocument").filter(|d| !d.is_null() && d.as_i64().is_none_or(|i| i >= 0))
|
||||
}
|
||||
|
||||
/// Displace's map read from a file (flattened, or its `mapLayer`).
|
||||
|
||||
Reference in new issue
Block a user