Rename environment process accessor to get_executor

Drop the stale remote_exec_server_client() accessor now that Environment
exposes the process capability directly, and rename the capability getter
to get_executor() on the environment trait and concrete type.

Co-authored-by: Codex <noreply@openai.com>
This commit is contained in:
starr-openai
2026-03-19 15:03:44 -07:00
co-authored by Codex
parent e60eeec4bf
commit 048438a44a
2 changed files with 4 additions and 13 deletions
+1 -1
View File
@@ -56,5 +56,5 @@ pub trait ExecProcess: Send + Sync {
/// Capability bundle exposed by an execution environment.
pub trait ExecutorEnvironment: Send + Sync {
fn process(&self) -> &(dyn ExecProcess + '_);
fn get_executor(&self) -> &(dyn ExecProcess + '_);
}
+3 -12
View File
@@ -53,15 +53,7 @@ impl Environment {
self.experimental_exec_server_url.as_deref()
}
pub fn remote_exec_server_client(&self) -> Option<&ExecServerClient> {
if self.experimental_exec_server_url.is_some() {
Some(&self.exec_server_client)
} else {
None
}
}
pub fn process(&self) -> &(dyn ExecProcess + '_) {
pub fn get_executor(&self) -> &(dyn ExecProcess + '_) {
&self.exec_server_client
}
@@ -75,8 +67,8 @@ impl Environment {
}
impl ExecutorEnvironment for Environment {
fn process(&self) -> &(dyn ExecProcess + '_) {
self.process()
fn get_executor(&self) -> &(dyn ExecProcess + '_) {
self.get_executor()
}
}
@@ -90,6 +82,5 @@ mod tests {
let environment = Environment::create(None).await.expect("create environment");
assert_eq!(environment.experimental_exec_server_url(), None);
assert!(environment.remote_exec_server_client().is_none());
}
}