@@ -6,11 +6,11 @@ use std::os::raw::c_char;
6
6
use std:: ptr:: NonNull ;
7
7
use std:: sync:: { Arc , Weak } ;
8
8
9
- pub ( crate ) unsafe fn ptr_to_cstr ( ptr : * const c_char ) -> Option < & ' static str > {
9
+ pub unsafe fn ptr_to_cstr ( ptr : * const c_char ) -> Option < & ' static str > {
10
10
unsafe { CStr :: from_ptr ( ptr) } . to_str ( ) . ok ( )
11
11
}
12
12
13
- pub ( crate ) unsafe fn ptr_to_cstr_n ( ptr : * const c_char , size : size_t ) -> Option < & ' static str > {
13
+ pub unsafe fn ptr_to_cstr_n ( ptr : * const c_char , size : size_t ) -> Option < & ' static str > {
14
14
if ptr. is_null ( ) {
15
15
return None ;
16
16
}
@@ -228,9 +228,8 @@ pub type CassBorrowedExclusivePtr<'a, T, CM> = CassPtr<'a, T, (Exclusive, CM)>;
228
228
229
229
/// Utility method for tests. Useful when some method returns `T*`,
230
230
/// and then another method accepts `const T*`.
231
- #[ cfg( test) ]
232
231
impl < ' a , T : Sized , P : Properties > CassPtr < ' a , T , P > {
233
- pub ( crate ) fn into_c_const ( self ) -> CassPtr < ' a , T , ( P :: Onwership , CConst ) > {
232
+ pub fn into_c_const ( self ) -> CassPtr < ' a , T , ( P :: Onwership , CConst ) > {
234
233
CassPtr {
235
234
ptr : self . ptr ,
236
235
_phantom : PhantomData ,
@@ -309,7 +308,7 @@ impl<T: Sized, P: Properties> CassPtr<'_, T, P> {
309
308
/// Resulting pointer inherits the lifetime from the immutable borrow
310
309
/// of original pointer.
311
310
#[ allow( clippy:: needless_lifetimes) ]
312
- pub ( crate ) fn borrow < ' a > ( & ' a self ) -> CassPtr < ' a , T , ( Shared , P :: CMutability ) > {
311
+ pub fn borrow < ' a > ( & ' a self ) -> CassPtr < ' a , T , ( Shared , P :: CMutability ) > {
313
312
CassPtr {
314
313
ptr : self . ptr ,
315
314
_phantom : PhantomData ,
@@ -323,8 +322,7 @@ impl<T: Sized> CassPtr<'_, T, (Exclusive, CMut)> {
323
322
/// of original pointer. Since the method accepts a mutable reference
324
323
/// to the original pointer, we enforce aliasing ^ mutability principle at compile time.
325
324
#[ allow( clippy:: needless_lifetimes) ]
326
- #[ cfg_attr( not( test) , expect( unused) ) ]
327
- pub ( crate ) fn borrow_mut < ' a > ( & ' a mut self ) -> CassPtr < ' a , T , ( Exclusive , CMut ) > {
325
+ pub fn borrow_mut < ' a > ( & ' a mut self ) -> CassPtr < ' a , T , ( Exclusive , CMut ) > {
328
326
CassPtr {
329
327
ptr : self . ptr ,
330
328
_phantom : PhantomData ,
0 commit comments