Skip to content

Commit

Permalink
refactor: more CStr literals
Browse files Browse the repository at this point in the history
  • Loading branch information
SteveLauC committed Oct 11, 2024
1 parent 5099cd9 commit f3783d1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions pgrx-tests/src/tests/roundtrip_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -214,10 +214,10 @@ mod tests {
// Vec<Option<&'static CStr>>,
// vec![
// None,
// Some(unsafe { CStr::from_bytes_with_nul_unchecked(b"&one\0") }),
// Some(unsafe { CStr::from_bytes_with_nul_unchecked(b"&two\0") }),
// Some(unsafe { c"&one" }),
// Some(unsafe { c"&two" }),
// None,
// Some(unsafe { CStr::from_bytes_with_nul_unchecked(b"&three\0") }),
// Some(unsafe { c"&three" }),
// None,
// ]
// );
Expand Down
6 changes: 3 additions & 3 deletions pgrx-tests/tests/todo/roundtrip-tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,10 @@ mod tests {
Vec<Option<&'static CStr>>,
vec![
None,
Some(unsafe { CStr::from_bytes_with_nul_unchecked(b"&one\0") }),
Some(unsafe { CStr::from_bytes_with_nul_unchecked(b"&two\0") }),
Some(unsafe { c"&one" }),
Some(unsafe { c"&two" }),
None,
Some(unsafe { CStr::from_bytes_with_nul_unchecked(b"&three\0") }),
Some(unsafe { "&three" }),
None,
]
);
Expand Down

0 comments on commit f3783d1

Please sign in to comment.