From ad5efc4b0f2947f92d1d7826b8cd3d1496fa4d2d Mon Sep 17 00:00:00 2001 From: Tom Alexander Date: Sat, 14 Oct 2023 18:09:50 -0400 Subject: [PATCH] Only require sync on FileAccessInterface when compiling for compare utilities. Otherwise async compatibility would impact sync users of the plain library. --- src/context/file_access_interface.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/context/file_access_interface.rs b/src/context/file_access_interface.rs index 2d93e637..d269edff 100644 --- a/src/context/file_access_interface.rs +++ b/src/context/file_access_interface.rs @@ -1,10 +1,16 @@ use std::fmt::Debug; use std::path::PathBuf; +#[cfg(any(feature = "compare", feature = "foreign_document_test"))] pub trait FileAccessInterface: Sync + Debug { fn read_file(&self, path: &str) -> Result; } +#[cfg(not(any(feature = "compare", feature = "foreign_document_test")))] +pub trait FileAccessInterface: Debug { + fn read_file(&self, path: &str) -> Result; +} + #[derive(Debug, Clone)] pub struct LocalFileAccessInterface { pub working_directory: Option,