Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow Context to be Send #34

Merged
merged 1 commit into from
Dec 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ macro_rules! pairwise {
#[derive(Default)]
pub struct ContextBuilder {
solver_program_and_args: Option<(ffi::OsString, Vec<ffi::OsString>)>,
replay_file: Option<Box<dyn io::Write>>,
replay_file: Option<Box<dyn io::Write + Send>>,
}

impl ContextBuilder {
Expand Down Expand Up @@ -117,7 +117,7 @@ impl ContextBuilder {
/// By default, there is no replay file configured.
pub fn replay_file<W>(&mut self, replay_file: Option<W>) -> &mut Self
where
W: 'static + io::Write,
W: 'static + io::Write + Send,
{
self.replay_file = replay_file.map(|w| Box::new(w) as _);
self
Expand Down
4 changes: 2 additions & 2 deletions src/solver.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ pub(crate) struct Solver {
_handle: process::Child,
stdin: process::ChildStdin,
stdout: io::Lines<io::BufReader<process::ChildStdout>>,
replay_file: Box<dyn io::Write>,
replay_file: Box<dyn io::Write + Send>,
parser: Parser,
}

impl Solver {
pub fn new(
program: ffi::OsString,
args: Vec<ffi::OsString>,
replay_file: Box<dyn io::Write>,
replay_file: Box<dyn io::Write + Send>,
) -> io::Result<Self> {
let mut handle = process::Command::new(program)
.args(args)
Expand Down
Loading