mirror of
https://github.com/aljazceru/turso.git
synced 2026-01-06 17:54:20 +01:00
Merge 'core/function: Wrap ExtFunc in Arc' from Pekka Enberg
Make it Send. Reviewed-by: Jussi Saurio <jussi.saurio@gmail.com> Closes #3172
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
use std::fmt;
|
||||
use std::fmt::{Debug, Display};
|
||||
use std::rc::Rc;
|
||||
use std::sync::Arc;
|
||||
use turso_ext::{FinalizeFunction, InitAggFunction, ScalarFunction, StepFunction};
|
||||
|
||||
@@ -204,7 +203,7 @@ pub enum AggFunc {
|
||||
JsonbGroupObject,
|
||||
#[cfg(feature = "json")]
|
||||
JsonGroupObject,
|
||||
External(Rc<ExtFunc>),
|
||||
External(Arc<ExtFunc>),
|
||||
}
|
||||
|
||||
impl PartialEq for AggFunc {
|
||||
@@ -218,7 +217,7 @@ impl PartialEq for AggFunc {
|
||||
| (Self::StringAgg, Self::StringAgg)
|
||||
| (Self::Sum, Self::Sum)
|
||||
| (Self::Total, Self::Total) => true,
|
||||
(Self::External(a), Self::External(b)) => Rc::ptr_eq(a, b),
|
||||
(Self::External(a), Self::External(b)) => Arc::ptr_eq(a, b),
|
||||
_ => false,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user