Skip to content

Commit 2d18e0d

Browse files
authored
Merge pull request mthom#2413 from Skgland/master
re-add CI job to test Cargo.toml rust-version
2 parents 9672045 + 45a8a7b commit 2d18e0d

File tree

3 files changed

+14
-9
lines changed

3 files changed

+14
-9
lines changed

.github/workflows/ci.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,9 @@ jobs:
4545
- { os: ubuntu-22.04, rust-version: stable, target: 'x86_64-unknown-linux-gnu', publish: true }
4646
- { os: ubuntu-22.04, rust-version: stable, target: 'i686-unknown-linux-gnu', publish: true }
4747
# FIXME(issue #2138): run wasm tests, failing to run since https://github.com/mthom/scryer-prolog/pull/2137 removed wasm-pack
48-
- { os: ubuntu-22.04, rust-version: nightly, target: 'wasm32-unknown-unknown', publish: true, args: '--no-default-features' , test-args: '--no-run --no-default-features' }
48+
- { os: ubuntu-22.04, rust-version: nightly, target: 'wasm32-unknown-unknown', publish: true, args: '--no-default-features' , test-args: '--no-run --no-default-features', use_swap: true }
49+
# Cargo.toml rust-version
50+
- { os: ubuntu-22.04, rust-version: "1.77", target: 'x86_64-unknown-linux-gnu'}
4951
# rust versions
5052
- { os: ubuntu-22.04, rust-version: beta, target: 'x86_64-unknown-linux-gnu'}
5153
- { os: ubuntu-22.04, rust-version: nightly, target: 'x86_64-unknown-linux-gnu'}
@@ -54,6 +56,10 @@ jobs:
5456
shell: bash
5557
steps:
5658
- uses: actions/checkout@v3
59+
- uses: actionhippie/swap-space@v1
60+
if: matrix.use_swap
61+
with:
62+
size: 10G
5763
- name: Setup Rust
5864
uses: ./.github/actions/setup-rust
5965
with:

src/machine/streams.rs

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ use std::io;
2424
#[cfg(feature = "http")]
2525
use std::io::BufRead;
2626
use std::io::{Cursor, ErrorKind, Read, Seek, SeekFrom, Write};
27-
use std::mem;
2827
use std::net::{Shutdown, TcpStream};
2928
use std::ops::{Deref, DerefMut};
3029
use std::path::PathBuf;
@@ -296,9 +295,9 @@ impl Read for HttpReadStream {
296295
#[cfg(feature = "http")]
297296
pub struct HttpWriteStream {
298297
status_code: u16,
299-
headers: mem::ManuallyDrop<hyper::HeaderMap>,
298+
headers: std::mem::ManuallyDrop<hyper::HeaderMap>,
300299
response: TypedArenaPtr<HttpResponse>,
301-
buffer: mem::ManuallyDrop<Vec<u8>>,
300+
buffer: std::mem::ManuallyDrop<Vec<u8>>,
302301
}
303302

304303
#[cfg(feature = "http")]
@@ -325,8 +324,8 @@ impl Write for HttpWriteStream {
325324
#[cfg(feature = "http")]
326325
impl HttpWriteStream {
327326
fn drop(&mut self) {
328-
let headers = unsafe { mem::ManuallyDrop::take(&mut self.headers) };
329-
let buffer = unsafe { mem::ManuallyDrop::take(&mut self.buffer) };
327+
let headers = unsafe { std::mem::ManuallyDrop::take(&mut self.headers) };
328+
let buffer = unsafe { std::mem::ManuallyDrop::take(&mut self.buffer) };
330329

331330
let (ready, response, cvar) = &**self.response;
332331

@@ -1228,8 +1227,8 @@ impl Stream {
12281227
StreamLayout::new(CharReader::new(HttpWriteStream {
12291228
response,
12301229
status_code,
1231-
headers: mem::ManuallyDrop::new(headers),
1232-
buffer: mem::ManuallyDrop::new(Vec::new()),
1230+
headers: std::mem::ManuallyDrop::new(headers),
1231+
buffer: std::mem::ManuallyDrop::new(Vec::new()),
12331232
})),
12341233
arena
12351234
))

src/parser/parser.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ pub(crate) fn as_partial_string(
109109
tail_ref = succ;
110110
}
111111
Term::PartialString(_, pstr, tail) => {
112-
string += &pstr;
112+
string += pstr;
113113
tail_ref = tail;
114114
}
115115
Term::CompleteString(_, cstr) => {

0 commit comments

Comments
 (0)