preset: consider scale
when parsing xy scale
This commit is contained in:
parent
8606c55a92
commit
1c18faa83e
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -1,2 +1,4 @@
|
||||||
/src/target/
|
/src/target/
|
||||||
/target/debug/
|
/target/debug/
|
||||||
|
/target/
|
||||||
|
/target
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
#![feature(drain_filter)]
|
#![feature(drain_filter)]
|
||||||
|
|
||||||
mod error;
|
mod error;
|
||||||
pub mod parse;
|
mod parse;
|
||||||
mod preset;
|
mod preset;
|
||||||
pub use preset::*;
|
pub use preset::*;
|
||||||
|
pub use error::*;
|
|
@ -424,7 +424,7 @@ pub fn parse_values(
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if let Ok((_, idx)) = parse_indexed_key("scale_x", token.key) {
|
if let Ok((_, idx)) = parse_indexed_key("scale_x", token.key) {
|
||||||
let scale = if values.iter().any(|t| matches!(*t, Value::ScaleTypeX(match_idx, ScaleType::Absolute) if match_idx == idx)) {
|
let scale = if values.iter().any(|t| matches!(*t, Value::ScaleType(match_idx, ScaleType::Absolute) | Value::ScaleTypeX(match_idx, ScaleType::Absolute) if match_idx == idx)) {
|
||||||
let scale = from_int(token.value)?;
|
let scale = from_int(token.value)?;
|
||||||
ScaleFactor::Absolute(scale)
|
ScaleFactor::Absolute(scale)
|
||||||
} else {
|
} else {
|
||||||
|
@ -436,7 +436,7 @@ pub fn parse_values(
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if let Ok((_, idx)) = parse_indexed_key("scale_y", token.key) {
|
if let Ok((_, idx)) = parse_indexed_key("scale_y", token.key) {
|
||||||
let scale = if values.iter().any(|t| matches!(*t, Value::ScaleTypeY(match_idx, ScaleType::Absolute) if match_idx == idx)) {
|
let scale = if values.iter().any(|t| matches!(*t, Value::ScaleType(match_idx, ScaleType::Absolute) | Value::ScaleTypeY(match_idx, ScaleType::Absolute) if match_idx == idx)) {
|
||||||
let scale = from_int(token.value)?;
|
let scale = from_int(token.value)?;
|
||||||
ScaleFactor::Absolute(scale)
|
ScaleFactor::Absolute(scale)
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
{"rustc_fingerprint":13884731479247197160,"outputs":{"4614504638168534921":{"success":true,"status":"","code":0,"stdout":"rustc 1.65.0-nightly (750bd1a7f 2022-09-14)\nbinary: rustc\ncommit-hash: 750bd1a7ff3e010611b97ee75d30b7cbf5f3a03c\ncommit-date: 2022-09-14\nhost: x86_64-pc-windows-msvc\nrelease: 1.65.0-nightly\nLLVM version: 15.0.0\n","stderr":""},"16074388977461238104":{"success":true,"status":"","code":0,"stdout":"___.exe\nlib___.rlib\n___.dll\n___.dll\n___.lib\n___.dll\n","stderr":""},"4658116585089295848":{"success":true,"status":"","code":0,"stdout":"___.exe\nlib___.rlib\n___.dll\n___.dll\n___.lib\n___.dll\nC:\\Users\\ronny\\.rustup\\toolchains\\nightly-x86_64-pc-windows-msvc\ndebug_assertions\nfeature=\"cargo-clippy\"\npanic=\"unwind\"\nproc_macro\ntarget_abi=\"\"\ntarget_arch=\"x86_64\"\ntarget_endian=\"little\"\ntarget_env=\"msvc\"\ntarget_family=\"windows\"\ntarget_feature=\"fxsr\"\ntarget_feature=\"llvm14-builtins-abi\"\ntarget_feature=\"sse\"\ntarget_feature=\"sse2\"\ntarget_has_atomic=\"16\"\ntarget_has_atomic=\"32\"\ntarget_has_atomic=\"64\"\ntarget_has_atomic=\"8\"\ntarget_has_atomic=\"ptr\"\ntarget_has_atomic_equal_alignment=\"16\"\ntarget_has_atomic_equal_alignment=\"32\"\ntarget_has_atomic_equal_alignment=\"64\"\ntarget_has_atomic_equal_alignment=\"8\"\ntarget_has_atomic_equal_alignment=\"ptr\"\ntarget_has_atomic_load_store=\"16\"\ntarget_has_atomic_load_store=\"32\"\ntarget_has_atomic_load_store=\"64\"\ntarget_has_atomic_load_store=\"8\"\ntarget_has_atomic_load_store=\"ptr\"\ntarget_os=\"windows\"\ntarget_pointer_width=\"64\"\ntarget_thread_local\ntarget_vendor=\"pc\"\nwindows\n","stderr":""}},"successes":{}}
|
{"rustc_fingerprint":1842804115855352081,"outputs":{"15697416045686424142":{"success":true,"status":"","code":0,"stdout":"___.exe\nlib___.rlib\n___.dll\n___.dll\n___.lib\n___.dll\n","stderr":""},"4614504638168534921":{"success":true,"status":"","code":0,"stdout":"rustc 1.65.0-nightly (750bd1a7f 2022-09-14)\nbinary: rustc\ncommit-hash: 750bd1a7ff3e010611b97ee75d30b7cbf5f3a03c\ncommit-date: 2022-09-14\nhost: x86_64-pc-windows-msvc\nrelease: 1.65.0-nightly\nLLVM version: 15.0.0\n","stderr":""},"10376369925670944939":{"success":true,"status":"","code":0,"stdout":"___.exe\nlib___.rlib\n___.dll\n___.dll\n___.lib\n___.dll\nC:\\Users\\ronny\\.rustup\\toolchains\\nightly-x86_64-pc-windows-msvc\ndebug_assertions\npanic=\"unwind\"\nproc_macro\ntarget_abi=\"\"\ntarget_arch=\"x86_64\"\ntarget_endian=\"little\"\ntarget_env=\"msvc\"\ntarget_family=\"windows\"\ntarget_feature=\"fxsr\"\ntarget_feature=\"llvm14-builtins-abi\"\ntarget_feature=\"sse\"\ntarget_feature=\"sse2\"\ntarget_has_atomic=\"16\"\ntarget_has_atomic=\"32\"\ntarget_has_atomic=\"64\"\ntarget_has_atomic=\"8\"\ntarget_has_atomic=\"ptr\"\ntarget_has_atomic_equal_alignment=\"16\"\ntarget_has_atomic_equal_alignment=\"32\"\ntarget_has_atomic_equal_alignment=\"64\"\ntarget_has_atomic_equal_alignment=\"8\"\ntarget_has_atomic_equal_alignment=\"ptr\"\ntarget_has_atomic_load_store=\"16\"\ntarget_has_atomic_load_store=\"32\"\ntarget_has_atomic_load_store=\"64\"\ntarget_has_atomic_load_store=\"8\"\ntarget_has_atomic_load_store=\"ptr\"\ntarget_os=\"windows\"\ntarget_pointer_width=\"64\"\ntarget_thread_local\ntarget_vendor=\"pc\"\nwindows\n","stderr":""}},"successes":{}}
|
Loading…
Reference in a new issue