Skip to content

Remove the tell function from FileExt on WASI. #387

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

Merged
merged 2 commits into from
Apr 4, 2025
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: 4 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -371,6 +371,10 @@ jobs:
- uses: ./.github/actions/install-rust
with:
toolchain: ${{ matrix.rust }}

- name: Use specific dependency versions for Rust 1.63 compatibility.
run: cargo update --package=once_cell --precise=1.20.3

# Don't use --all-features because some of the features have dependencies
# that don't work on newer Rust versions.
- run: cargo test --workspace --features=fs_utf8,arf_strings
Expand Down
3 changes: 0 additions & 3 deletions cap-primitives/src/fs/file.rs
Original file line number Diff line number Diff line change
Expand Up @@ -157,9 +157,6 @@ pub trait FileExt {
Ok(())
}

/// Returns the current position within the file.
fn tell(&self) -> io::Result<u64>;

/// Adjust the flags associated with this file.
fn fdstat_set_flags(&self, flags: u16) -> io::Result<()>;

Expand Down
5 changes: 0 additions & 5 deletions cap-std/src/fs/file.rs
Original file line number Diff line number Diff line change
Expand Up @@ -523,11 +523,6 @@ impl crate::fs::FileExt for File {
std::os::wasi::fs::FileExt::write_vectored_at(&self.std, bufs, offset)
}

#[inline]
fn tell(&self) -> std::result::Result<u64, io::Error> {
std::os::wasi::fs::FileExt::tell(&self.std)
}

#[inline]
fn fdstat_set_flags(&self, flags: u16) -> std::result::Result<(), io::Error> {
std::os::wasi::fs::FileExt::fdstat_set_flags(&self.std, flags)
Expand Down
5 changes: 0 additions & 5 deletions cap-std/src/fs_utf8/file.rs
Original file line number Diff line number Diff line change
Expand Up @@ -521,11 +521,6 @@ impl crate::fs::FileExt for File {
self.cap_std.write_vectored_at(bufs, offset)
}

#[inline]
fn tell(&self) -> std::result::Result<u64, io::Error> {
self.cap_std.tell()
}

#[inline]
fn fdstat_set_flags(&self, flags: u16) -> std::result::Result<(), io::Error> {
self.cap_std.fdstat_set_flags(flags)
Expand Down
Loading