Fix bounded read argument comments

This commit is contained in:
Chris Hayduk
2026-05-28 11:02:22 -04:00
parent bdba10d68e
commit 72901ac18c
5 changed files with 26 additions and 7 deletions

View File

@@ -71,7 +71,12 @@ impl FsRequestProcessor {
.await
.map_err(map_fs_error)?,
(Some(offset), Some(length)) => file_system
.read_file_range(&params.path, offset, length, /*sandbox*/ None)
.read_file_range(
&params.path,
/*offset*/ offset,
/*length*/ length,
/*sandbox*/ None,
)
.await
.map_err(map_fs_error)?,
_ => {

View File

@@ -177,7 +177,12 @@ pub(crate) async fn run_direct_request(
.await
.map_err(map_fs_error)?,
(Some(offset), Some(length)) => file_system
.read_file_range(&params.path, offset, length, /*sandbox*/ None)
.read_file_range(
&params.path,
/*offset*/ offset,
/*length*/ length,
/*sandbox*/ None,
)
.await
.map_err(map_fs_error)?,
_ => {

View File

@@ -99,7 +99,9 @@ impl ExecutorFileSystem for LocalFileSystem {
) -> FileSystemResult<Vec<u8>> {
let (file_system, sandbox) = self.file_system_for(sandbox)?;
file_system
.read_file_range(path, offset, length, sandbox)
.read_file_range(
path, /*offset*/ offset, /*length*/ length, sandbox,
)
.await
}
@@ -185,7 +187,9 @@ impl ExecutorFileSystem for UnsandboxedFileSystem {
) -> FileSystemResult<Vec<u8>> {
reject_platform_sandbox_context(sandbox)?;
self.file_system
.read_file_range(path, offset, length, /*sandbox*/ None)
.read_file_range(
path, /*offset*/ offset, /*length*/ length, /*sandbox*/ None,
)
.await
}

View File

@@ -54,7 +54,12 @@ impl FileSystemHandler {
.map_err(map_fs_error)?,
(Some(offset), Some(length)) => self
.file_system
.read_file_range(&params.path, offset, length, params.sandbox.as_ref())
.read_file_range(
&params.path,
/*offset*/ offset,
/*length*/ length,
params.sandbox.as_ref(),
)
.await
.map_err(map_fs_error)?,
_ => {

View File

@@ -373,8 +373,8 @@ async fn file_system_methods_cover_surface_area(use_remote: bool) -> Result<()>
let nested_file_range = file_system
.read_file_range(
&absolute_path(nested_file.clone()),
6,
4,
/*offset*/ 6,
/*length*/ 4,
/*sandbox*/ None,
)
.await