Skip to content

Commit 9a7e1be

Browse files
authored
Remove the tell function from FileExt on WASI. (#387)
* Remove the `tell` function from `FileExt` on WASI. Fixes #385. * Pin once_cell for the MSRV build.
1 parent dcead54 commit 9a7e1be

File tree

4 files changed

+4
-13
lines changed

4 files changed

+4
-13
lines changed

.github/workflows/main.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -371,6 +371,10 @@ jobs:
371371
- uses: ./.github/actions/install-rust
372372
with:
373373
toolchain: ${{ matrix.rust }}
374+
375+
- name: Use specific dependency versions for Rust 1.63 compatibility.
376+
run: cargo update --package=once_cell --precise=1.20.3
377+
374378
# Don't use --all-features because some of the features have dependencies
375379
# that don't work on newer Rust versions.
376380
- run: cargo test --workspace --features=fs_utf8,arf_strings

cap-primitives/src/fs/file.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -157,9 +157,6 @@ pub trait FileExt {
157157
Ok(())
158158
}
159159

160-
/// Returns the current position within the file.
161-
fn tell(&self) -> io::Result<u64>;
162-
163160
/// Adjust the flags associated with this file.
164161
fn fdstat_set_flags(&self, flags: u16) -> io::Result<()>;
165162

cap-std/src/fs/file.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -523,11 +523,6 @@ impl crate::fs::FileExt for File {
523523
std::os::wasi::fs::FileExt::write_vectored_at(&self.std, bufs, offset)
524524
}
525525

526-
#[inline]
527-
fn tell(&self) -> std::result::Result<u64, io::Error> {
528-
std::os::wasi::fs::FileExt::tell(&self.std)
529-
}
530-
531526
#[inline]
532527
fn fdstat_set_flags(&self, flags: u16) -> std::result::Result<(), io::Error> {
533528
std::os::wasi::fs::FileExt::fdstat_set_flags(&self.std, flags)

cap-std/src/fs_utf8/file.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -521,11 +521,6 @@ impl crate::fs::FileExt for File {
521521
self.cap_std.write_vectored_at(bufs, offset)
522522
}
523523

524-
#[inline]
525-
fn tell(&self) -> std::result::Result<u64, io::Error> {
526-
self.cap_std.tell()
527-
}
528-
529524
#[inline]
530525
fn fdstat_set_flags(&self, flags: u16) -> std::result::Result<(), io::Error> {
531526
self.cap_std.fdstat_set_flags(flags)

0 commit comments

Comments
 (0)