Skip to content

Commit d2c39ef

Browse files
committed
Tweak register_scalar_function_with_state to take reference
1 parent b1966bb commit d2c39ef

File tree

1 file changed

+2
-2
lines changed
  • crates/duckdb/src/vscalar

1 file changed

+2
-2
lines changed

crates/duckdb/src/vscalar/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ impl Connection {
148148

149149
/// Register the given ScalarFunction with custom state
150150
#[inline]
151-
pub fn register_scalar_function_with_state<S: VScalar>(&self, name: &str, state: S::State) -> crate::Result<()>
151+
pub fn register_scalar_function_with_state<S: VScalar>(&self, name: &str, state: &S::State) -> crate::Result<()>
152152
where
153153
S::State: Clone,
154154
{
@@ -315,7 +315,7 @@ mod test {
315315
{
316316
conn.register_scalar_function_with_state::<EchoScalar>(
317317
"echo2",
318-
TestState {
318+
&TestState {
319319
multiplier: 5,
320320
prefix: "custom".to_string(),
321321
},

0 commit comments

Comments
 (0)