Skip to content

Commit b759caa

Browse files
committed
add mutable access to the hosts
1 parent 7324560 commit b759caa

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

tokio-postgres/src/config.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -375,6 +375,11 @@ impl Config {
375375
&self.host
376376
}
377377

378+
/// Gets a mutable view of the hosts that have been added to the configuration with `host`.
379+
pub fn get_hosts_mut(&mut self) -> &mut [Host] {
380+
&mut self.host
381+
}
382+
378383
/// Sets the hostname used during TLS certificate verification, if enabled.
379384
///
380385
/// This can be useful if you are connecting through an SSH tunnel.

0 commit comments

Comments
 (0)