From 03d4dc9fe0d257655d99e5fb4a0b0e5f7519f7b0 Mon Sep 17 00:00:00 2001 From: Egor Larionov Date: Thu, 16 Feb 2023 19:55:40 -0800 Subject: [PATCH] Fix warnings in tests without xml support --- tests/pygmsh.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/pygmsh.rs b/tests/pygmsh.rs index 30af7e8..0306880 100644 --- a/tests/pygmsh.rs +++ b/tests/pygmsh.rs @@ -186,6 +186,7 @@ fn legacy_binary() -> Result { /// Ensures that points from the two given vtk files are equivalent up to floating point error, and then overwrites /// the first input to match exactly to the points in the second input, so the can be compared using `PartialEq` later. +#[cfg(feature = "xml")] fn compare_points_in_float_and_overwrite(vtu: &mut Vtk, expected: &Vtk) { let expected_points = if let DataSet::UnstructuredGrid { ref pieces, .. } = expected.data { pieces[0] @@ -226,6 +227,7 @@ fn compare_points_in_float_and_overwrite(vtu: &mut Vtk, expected: &Vtk) { /// Ensures the given xml based vtk file has the right values and overwrites them to match /// the asset returned by make_test_file. +#[cfg(feature = "xml")] fn assert_and_fix_xml_vtu(vtu: &mut Vtk) { vtu.file_path = None; // Reset file path to satisfy comparison assert_eq!(vtu.version, Version::new_xml(0, 1)); // XML file version is ignored.