@@ -15,8 +15,8 @@ use time::OffsetDateTime;
1515/// The top-level struct of the SDK, representing a client containing [indexes](../indexes/struct.Index.html).
1616#[ derive( Debug , Clone ) ]
1717pub struct Client {
18- pub ( crate ) host : Arc < String > ,
19- pub ( crate ) api_key : Arc < String > ,
18+ pub ( crate ) host : String ,
19+ pub ( crate ) api_key : String ,
2020}
2121
2222impl Client {
@@ -36,8 +36,8 @@ impl Client {
3636 /// ```
3737 pub fn new ( host : impl Into < String > , api_key : impl Into < String > ) -> Client {
3838 Client {
39- host : Arc :: new ( host. into ( ) ) ,
40- api_key : Arc :: new ( api_key. into ( ) ) ,
39+ host : host. into ( ) ,
40+ api_key : api_key. into ( ) ,
4141 }
4242 }
4343
@@ -985,7 +985,7 @@ mod tests {
985985 let key = client. create_key ( key) . await . unwrap ( ) ;
986986 let master_key = client. api_key . clone ( ) ;
987987 // this key has no right
988- client. api_key = Arc :: new ( key. key . clone ( ) ) ;
988+ client. api_key = key. key . clone ( ) ;
989989 // with a wrong key
990990 let error = client. delete_key ( "invalid_key" ) . await . unwrap_err ( ) ;
991991 assert ! ( matches!(
@@ -1060,7 +1060,7 @@ mod tests {
10601060
10611061 // backup the master key for cleanup at the end of the test
10621062 let master_client = client. clone ( ) ;
1063- client. api_key = Arc :: new ( no_right_key. key . clone ( ) ) ;
1063+ client. api_key = no_right_key. key . clone ( ) ;
10641064
10651065 let mut key = KeyBuilder :: new ( ) ;
10661066 key. with_name ( format ! ( "{name}_2" ) ) ;
0 commit comments