Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitrii-ubskii committed Apr 4, 2024
1 parent a845888 commit d23e2dd
Showing 1 changed file with 4 additions and 11 deletions.
15 changes: 4 additions & 11 deletions c/src/connection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,7 @@ pub extern "C" fn connection_open_cloud(
credential: *const Credential,
) -> *mut Connection {
let addresses: Vec<&str> = string_array_view(addresses).collect();
try_release(Connection::new_cloud(
&addresses,
borrow(credential).clone(),
))
try_release(Connection::new_cloud(&addresses, borrow(credential).clone()))
}

/// Open a TypeDB Driver to TypeDB Cloud server(s) available at the provided addresses, using
Expand All @@ -65,13 +62,9 @@ pub extern "C" fn connection_open_cloud_translated(
translated_addresses: *const *const c_char,
credential: *const Credential,
) -> *mut Connection {
let addresses: HashMap<&str, &str> = string_array_view(advertised_addresses)
.zip(string_array_view(translated_addresses))
.collect();
try_release(Connection::new_cloud_address_map(
addresses,
borrow(credential).clone(),
))
let addresses: HashMap<&str, &str> =
string_array_view(advertised_addresses).zip(string_array_view(translated_addresses)).collect();
try_release(Connection::new_cloud_address_map(addresses, borrow(credential).clone()))
}

/// Closes the driver. Before instantiating a new driver, the driver that’s currently open should first be closed.
Expand Down

0 comments on commit d23e2dd

Please sign in to comment.