Skip to content

Commit

Permalink
Remove redundant clones (#23757)
Browse files Browse the repository at this point in the history
There were couple of instances where we copied FunctionRunnerCore and InProcessFunctionRunner by mistake. Those structure should not be clonable. We have removed all relevent use cases so we can now just remove the clones.

GitOrigin-RevId: 31e4ecd11fd83c326d213a10e1c1d4be90de75f4
  • Loading branch information
Preslav Le authored and Convex, Inc. committed Mar 21, 2024
1 parent e9a9daf commit 267255d
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions crates/function_runner/src/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -142,20 +142,6 @@ pub struct FunctionRunnerCore<RT: Runtime, S: StorageForInstance<RT>> {
module_cache: ModuleCache<RT>,
}

impl<RT: Runtime, S: StorageForInstance<RT>> Clone for FunctionRunnerCore<RT, S> {
fn clone(&self) -> Self {
Self {
rt: self.rt.clone(),
sender: self.sender.clone(),
scheduler: self.scheduler.clone(),
handles: self.handles.clone(),
storage: self.storage.clone(),
index_cache: self.index_cache.clone(),
module_cache: self.module_cache.clone(),
}
}
}

pub async fn validate_run_function_result(
udf_type: UdfType,
ts: Timestamp,
Expand Down Expand Up @@ -428,7 +414,6 @@ impl<RT: Runtime, S: StorageForInstance<RT>> FunctionRunnerCore<RT, S> {
}
}

#[derive(Clone)]
pub struct InProcessFunctionRunner<RT: Runtime> {
server: FunctionRunnerCore<RT, Arc<dyn Storage>>,
persistence_reader: Box<dyn PersistenceReader>,
Expand Down

0 comments on commit 267255d

Please sign in to comment.