]> Repositorios git - scryer-prolog.git/commitdiff
cleanup after msrv bump
authorSkgland <[email protected]>
Fri, 5 Jun 2026 18:44:38 +0000 (20:44 +0200)
committerSkgland <[email protected]>
Fri, 5 Jun 2026 18:44:38 +0000 (20:44 +0200)
Cargo.lock
Cargo.toml
build/main.rs
src/machine/system_calls.rs

index fbb9e68095c65db3846fb6ecface9d6bf4c40321..480ba916c96a0c8047e276d8f0af64bc6515bf45 100644 (file)
@@ -2841,7 +2841,6 @@ dependencies = [
  "to-syn-value_derive",
  "tokio",
  "trycmd",
- "version_check",
  "walkdir",
  "warp",
  "wasm-bindgen",
index dc17a2d9c398659e70cc5c8aad4da82ad16ff558..f75116770fcf0c8cffd20d438fe5f1a43a0d9567 100644 (file)
@@ -40,9 +40,7 @@ crypto-full = ["dep:ring"]
 collapsible_match = "allow"
 
 [lints.rust]
-unexpected_cfgs = { level = "deny", check-cfg = [
-    'cfg(rust_version, values("1.87.0"))',
-] }
+unexpected_cfgs = "deny"
 function_casts_as_integer = "deny"
 
 [build-dependencies]
@@ -53,7 +51,6 @@ strum_macros = "0.26"
 syn = { version = "2.0.72", features = ['full', 'visit', 'extra-traits'] }
 to-syn-value = "0.1.1"
 to-syn-value_derive = "0.1.1"
-version_check = "0.9.5"
 walkdir = "2"
 
 [dependencies]
index e03c957ebd978e52be9c47dba0a3edfa7d4c7ec3..fd2f8c469a4a59a8c032d76929f98cdfb1a8029a 100644 (file)
@@ -45,10 +45,6 @@ fn find_prolog_files(path_prefix: &str, current_dir: &Path) -> Vec<(String, Path
 }
 
 fn main() {
-    if version_check::is_min_version("1.87.0").unwrap_or(false) {
-        println!(r#"cargo:rustc-cfg=rust_version="1.87.0""#);
-    }
-
     let has_rustfmt = Command::new("rustfmt")
         .arg("--version")
         .stdin(Stdio::inherit())
index c91bf870ed57a49c8d048a269ac744036fc5860e..821c0aa5e238aebf118072b425ddf06515d76e8a 100644 (file)
@@ -8850,13 +8850,7 @@ impl Machine {
             .stderr(stderr);
 
         match command.spawn() {
-            #[cfg_attr(rust_version = "1.87.0", expect(unused_mut))]
-            Ok(mut child) => {
-                #[cfg(not(rust_version = "1.87.0"))]
-                {
-                    self.anon_pipe_compat(&mut child, &stdin_args, &stdout_args, &stderr_args)?;
-                }
-
+            Ok(child) => {
                 let child_process_alloc: TypedArenaPtr<Child> =
                     arena_alloc!(child, &mut self.machine_st.arena);
 
@@ -8879,94 +8873,32 @@ impl Machine {
         }
     }
 
-    #[cfg(not(rust_version = "1.87.0"))]
-    fn anon_pipe_compat(
-        &mut self,
-        child: &mut std::process::Child,
-        stdin_args: &[HeapCellValue],
-        stdout_args: &[HeapCellValue],
-        stderr_args: &[HeapCellValue],
-    ) -> CallResult {
-        if let Some(atom!("pipe")) = stdin_args[0].to_atom() {
-            let writer = child.stdin.take().expect("Should have captured stdin");
-
-            let stream = Stream::from_pipe_writer(writer, &mut self.machine_st.arena);
-
-            self.indices
-                .add_stream(stream, atom!("process_create"), 3)
-                .map_err(|stub_gen| stub_gen(&mut self.machine_st))?;
-
-            unify!(self.machine_st, stdin_args[1], HeapCellValue::from(stream));
-        }
-
-        if let Some(atom!("pipe")) = stdout_args[0].to_atom() {
-            let writer = child.stdout.take().expect("Should have captured stdout");
-
-            let stream = Stream::from_pipe_reader(
-                PipeReader(PipeReaderInner::Stdout(writer)),
-                &mut self.machine_st.arena,
-            );
-
-            self.indices
-                .add_stream(stream, atom!("process_create"), 3)
-                .map_err(|stub_gen| stub_gen(&mut self.machine_st))?;
-
-            unify!(self.machine_st, stdout_args[1], HeapCellValue::from(stream));
-        }
-
-        if let Some(atom!("pipe")) = stderr_args[0].to_atom() {
-            let writer = child.stderr.take().expect("Should have captured stderr");
-
-            let stream = Stream::from_pipe_reader(
-                PipeReader(PipeReaderInner::Stderr(writer)),
-                &mut self.machine_st.arena,
-            );
-
-            self.indices
-                .add_stream(stream, atom!("process_create"), 3)
-                .map_err(|stub_gen| stub_gen(&mut self.machine_st))?;
-
-            unify!(self.machine_st, stderr_args[1], HeapCellValue::from(stream));
-        }
-
-        Ok(())
-    }
-
     fn handle_output_stream(&mut self, args: &[HeapCellValue]) -> Result<Stdio, MachineStub> {
         Ok(match args[0].to_atom() {
             Some(atom!("std")) => Stdio::inherit(),
             Some(atom!("null")) => Stdio::null(),
             Some(atom!("pipe")) => {
-                #[cfg(rust_version = "1.87.0")]
-                #[allow(clippy::incompatible_msrv)]
-                {
-                    let (reader, writer) = match std::io::pipe() {
-                        Ok(pipe_pair) => pipe_pair,
-                        Err(_) => {
-                            return Err(self.machine_st.open_permission_error(
-                                atom!("anonymous_pipe"),
-                                atom!("process_create"),
-                                3,
-                            ));
-                        }
-                    };
-
-                    let stream = Stream::from_pipe_reader(reader, &mut self.machine_st.arena);
+                let (reader, writer) = match std::io::pipe() {
+                    Ok(pipe_pair) => pipe_pair,
+                    Err(_) => {
+                        return Err(self.machine_st.open_permission_error(
+                            atom!("anonymous_pipe"),
+                            atom!("process_create"),
+                            3,
+                        ));
+                    }
+                };
 
-                    self.indices
-                        .add_stream(stream, atom!("process_create"), 3)
-                        .map_err(|stub_gen| stub_gen(&mut self.machine_st))?;
+                let stream = Stream::from_pipe_reader(reader, &mut self.machine_st.arena);
 
-                    self.machine_st
-                        .bind(args[1].as_var().unwrap(), stream.into());
+                self.indices
+                    .add_stream(stream, atom!("process_create"), 3)
+                    .map_err(|stub_gen| stub_gen(&mut self.machine_st))?;
 
-                    Stdio::from(writer)
-                }
+                self.machine_st
+                    .bind(args[1].as_var().unwrap(), stream.into());
 
-                #[cfg(not(rust_version = "1.87.0"))]
-                {
-                    Stdio::piped()
-                }
+                Stdio::from(writer)
             }
             Some(atom!("file")) => {
                 let path = self.machine_st.value_to_str_like(args[1]).unwrap();