@@ -152,7 +152,6 @@ impl<T> Drop for WsMaybeError<T> {
152152 fn drop ( & mut self ) {
153153 if !self . data . is_null ( ) {
154154 tracing:: trace!( "dropping obj {}" , self . type_id) ;
155- // let _ = unsafe { self.data.read() };
156155 let _ = unsafe { Box :: from_raw ( self . data ) } ;
157156 }
158157 }
@@ -348,6 +347,7 @@ impl WS_FIELD_V2 {
348347 pub fn name ( & self ) -> & CStr {
349348 unsafe { CStr :: from_ptr ( self . name . as_ptr ( ) as _ ) }
350349 }
350+
351351 pub fn r#type ( & self ) -> Ty {
352352 self . r#type . into ( )
353353 }
@@ -386,6 +386,7 @@ impl WS_FIELD {
386386 pub fn name ( & self ) -> & CStr {
387387 unsafe { CStr :: from_ptr ( self . name . as_ptr ( ) as _ ) }
388388 }
389+
389390 pub fn r#type ( & self ) -> Ty {
390391 self . r#type . into ( )
391392 }
@@ -569,13 +570,15 @@ impl WsResultSetTrait for WsResultSet {
569570 WsResultSet :: Schemaless ( rs) => rs. tmq_get_topic_name ( ) ,
570571 }
571572 }
573+
572574 fn tmq_get_db_name ( & self ) -> * const c_char {
573575 match self {
574576 WsResultSet :: Sql ( rs) => rs. tmq_get_db_name ( ) ,
575577 WsResultSet :: Tmq ( rs) => rs. tmq_get_db_name ( ) ,
576578 WsResultSet :: Schemaless ( rs) => rs. tmq_get_db_name ( ) ,
577579 }
578580 }
581+
579582 fn tmq_get_table_name ( & self ) -> * const c_char {
580583 match self {
581584 WsResultSet :: Sql ( rs) => rs. tmq_get_table_name ( ) ,
@@ -599,6 +602,7 @@ impl WsResultSetTrait for WsResultSet {
599602 WsResultSet :: Schemaless ( rs) => rs. tmq_get_vgroup_offset ( ) ,
600603 }
601604 }
605+
602606 fn tmq_get_vgroup_id ( & self ) -> i32 {
603607 match self {
604608 WsResultSet :: Sql ( rs) => rs. tmq_get_vgroup_id ( ) ,
@@ -646,6 +650,7 @@ impl WsResultSetTrait for WsResultSet {
646650 WsResultSet :: Schemaless ( rs) => rs. get_fields ( ) ,
647651 }
648652 }
653+
649654 fn get_fields_v2 ( & mut self ) -> * const WS_FIELD_V2 {
650655 match self {
651656 WsResultSet :: Sql ( rs) => rs. get_fields_v2 ( ) ,
@@ -989,9 +994,9 @@ unsafe fn query_with_sql(
989994) -> WsResult < WsResultSet > {
990995 let client = ( taos as * mut Taos )
991996 . as_mut ( )
992- . ok_or ( WsError :: new ( Code :: INVALID_PARA , "client pointer it null" ) ) ?;
997+ . ok_or ( WsError :: new ( Code :: INVALID_PARA , "client pointer is null" ) ) ?;
993998
994- let sql = CStr :: from_ptr ( sql as _ ) . to_str ( ) ?;
999+ let sql = CStr :: from_ptr ( sql) . to_str ( ) ?;
9951000 let rs = client. query_with_req_id ( sql, req_id) ?;
9961001 Ok ( WsResultSet :: Sql ( WsSqlResultSet :: new ( rs) ) )
9971002}
@@ -1141,7 +1146,7 @@ pub unsafe extern "C" fn ws_select_db(taos: *mut WS_TAOS, db: *const c_char) ->
11411146 }
11421147 } ;
11431148
1144- let db = CStr :: from_ptr ( db as _ ) . to_str ( ) ;
1149+ let db = CStr :: from_ptr ( db) . to_str ( ) ;
11451150 let db = match db {
11461151 Ok ( t) => t,
11471152 Err ( _) => {
0 commit comments