Skip to content

Commit 7d2d4da

Browse files
committed
Update emscripten
1 parent dff8eac commit 7d2d4da

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

.github/workflows/wasm.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository)
99
runs-on: ubuntu-latest
1010
steps:
11-
- uses: actions/checkout@v3
11+
- uses: actions/checkout@v4
1212
with:
1313
submodules: true
1414

@@ -21,7 +21,7 @@ jobs:
2121
- name: Setup emsdk
2222
uses: mymindstorm/setup-emsdk@v14
2323
with:
24-
version: 3.1.68
24+
version: 4.0.7
2525

2626
- name: Build WASM
2727
run: ./tool/build_wasm.sh

crates/core/src/bson/parser.rs

+6-2
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,12 @@ impl<'de> Parser<'de> {
4141
}
4242

4343
fn advance_byte(&mut self) -> Result<u8, BsonError> {
44-
let slice = self.advance_checked(1)?;
45-
Ok(slice[0])
44+
let value = *self
45+
.remaining_input
46+
.split_off_first()
47+
.ok_or_else(|| self.error(ErrorKind::UnexpectedEoF))?;
48+
49+
Ok(value)
4650
}
4751

4852
pub fn read_cstr(&mut self) -> Result<&'de str, BsonError> {

0 commit comments

Comments
 (0)