mirror of
https://github.com/openai/codex.git
synced 2026-09-05 15:18:41 +00:00
Fix bounded read argument comments
This commit is contained in:
@@ -71,7 +71,12 @@ impl FsRequestProcessor {
|
||||
.await
|
||||
.map_err(map_fs_error)?,
|
||||
(Some(offset), Some(length)) => file_system
|
||||
.read_file_range(¶ms.path, offset, length, /*sandbox*/ None)
|
||||
.read_file_range(
|
||||
¶ms.path,
|
||||
/*offset*/ offset,
|
||||
/*length*/ length,
|
||||
/*sandbox*/ None,
|
||||
)
|
||||
.await
|
||||
.map_err(map_fs_error)?,
|
||||
_ => {
|
||||
|
||||
@@ -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(¶ms.path, offset, length, /*sandbox*/ None)
|
||||
.read_file_range(
|
||||
¶ms.path,
|
||||
/*offset*/ offset,
|
||||
/*length*/ length,
|
||||
/*sandbox*/ None,
|
||||
)
|
||||
.await
|
||||
.map_err(map_fs_error)?,
|
||||
_ => {
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
|
||||
@@ -54,7 +54,12 @@ impl FileSystemHandler {
|
||||
.map_err(map_fs_error)?,
|
||||
(Some(offset), Some(length)) => self
|
||||
.file_system
|
||||
.read_file_range(¶ms.path, offset, length, params.sandbox.as_ref())
|
||||
.read_file_range(
|
||||
¶ms.path,
|
||||
/*offset*/ offset,
|
||||
/*length*/ length,
|
||||
params.sandbox.as_ref(),
|
||||
)
|
||||
.await
|
||||
.map_err(map_fs_error)?,
|
||||
_ => {
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user