diff --git a/executors/rust/src/collator.rs b/executors/rust/src/collator.rs index e4860d52..4aae85dc 100644 --- a/executors/rust/src/collator.rs +++ b/executors/rust/src/collator.rs @@ -28,6 +28,7 @@ pub fn run_collation_test(json_obj: &Value) -> Result { let alternate_option: Option<&str> = json_obj["alternate"].as_str(); let case_first_option: Option<&str> = json_obj["caseFirst"].as_str(); let case_level_option: Option<&str> = json_obj["caseLevel"].as_str(); + #[cfg(not(any(ver = "1.3", ver = "1.4", ver = "1.5", ver = "2.0-beta1")))] let numeric_option: Option<&str> = json_obj["numeric"].as_str(); let reorder_option: Option<&str> = json_obj["reorder"].as_str(); let backwards_option: Option<&str> = json_obj["backwards"].as_str(); @@ -199,23 +200,21 @@ pub fn run_collation_test(json_obj: &Value) -> Result { // Numeric sort order. // CollatorPreferences in beta2 vs. Enum Numeric + // !!! TODO: handle before 2.0beta2 + #[cfg(not(any(ver = "1.3", ver = "1.4", ver = "1.5", ver = "2.0-beta1")))] if let Some(numeric) = numeric_option { - #[cfg(not(any(ver = "1.3", ver = "1.4", ver = "1.5", ver = "2.0-beta1")))] - { - preferences.numeric_ordering = match numeric { - "off" => Some(CollationNumericOrdering::False), - "on" => Some(CollationNumericOrdering::True), - _ => { - return Ok(json!({ - "label": label, - "error_detail": {"numeric": numeric}, - "unsupported": "numeric", - "error_type": "unsupported", - })); - } + preferences.numeric_ordering = match numeric { + "off" => Some(CollationNumericOrdering::False), + "on" => Some(CollationNumericOrdering::True), + _ => { + return Ok(json!({ + "label": label, + "error_detail": {"numeric": numeric}, + "unsupported": "numeric", + "error_type": "unsupported", + })); } }; - // !!! TODO: handle before 2.0beta2 }; if let Some(alternate) = alternate_option { diff --git a/executors/rust/src/compat.rs b/executors/rust/src/compat.rs index b2d88d44..c0cca4e9 100644 --- a/executors/rust/src/compat.rs +++ b/executors/rust/src/compat.rs @@ -71,6 +71,7 @@ macro_rules! as_borrowed_2_0 { ver = "2.0-beta1", ver = "2.0-beta2" ))] +#[allow(unused_macros)] macro_rules! as_borrowed_2_0 { ($expr:expr) => { $expr