Kontinuation commented on code in PR #559:
URL: https://github.com/apache/sedona-db/pull/559#discussion_r2740609034


##########
rust/sedona-raster-functions/src/executor.rs:
##########
@@ -59,7 +59,7 @@ impl<'a, 'b> RasterExecutor<'a, 'b> {
     /// 4. Calling the provided function with each raster
     pub fn execute_raster_void<F>(&self, mut func: F) -> Result<()>
     where
-        F: FnMut(usize, Option<RasterRefImpl<'_>>) -> Result<()>,
+        F: FnMut(usize, Option<&RasterRefImpl<'_>>) -> Result<()>,

Review Comment:
   Passing reference instead of moving value into the closure to avoid 
repeatedly constructing `RasterRefImpl` from raster array or cloning it. We 
will not want to persist the `RasterRefImpl` value passed in for most of the 
time.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to