Skip to content

Commit b86e747

Browse files
Use CStr and CString because BorrowDatum is not impled for str
1 parent 907baff commit b86e747

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

pgrx-tests/src/tests/borrow_datum.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ mod tests {
6060
use super::*;
6161
#[allow(unused)]
6262
use crate as pgrx_tests;
63+
use std::ffi::{CStr, CString};
6364

6465
// Exercising BorrowDatum impls
6566
clonetrip!(clone_bool, test_clone_bool, &'a bool, &false);
@@ -73,7 +74,7 @@ mod tests {
7374
&'a pg_sys::Point,
7475
&pg_sys::Point { x: -1.0, y: f64::INFINITY }
7576
);
76-
clonetrip!(clone_str, test_clone_str, &'a str => String, "string", String::from("string"));
77+
clonetrip!(clone_str, test_clone_str, &'a CStr => CString, c"cee string", CString::from(c"cee string"));
7778
clonetrip!(
7879
clone_oid,
7980
test_clone_oid,

0 commit comments

Comments
 (0)