Skip to content

Commit e94bb9f

Browse files
committed
Update client::new to return Result<Client>
When introducing Windows support the client creation resulted in a breaking change with Result<Client> being returned. Signed-off-by: James Sturtevant <[email protected]>
1 parent edc11a7 commit e94bb9f

File tree

1 file changed

+1
-14
lines changed

1 file changed

+1
-14
lines changed

src/sync/client.rs

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -50,20 +50,7 @@ impl Client {
5050

5151
#[cfg(unix)]
5252
/// Initialize a new [`Client`] from raw file descriptor.
53-
#[deprecated(since="0.8.0", note="please use `new_from_fd` instead")]
54-
pub fn new(fd: RawFd) -> Client {
55-
let conn = ClientConnection::new(fd);
56-
57-
Self::new_client(conn).unwrap_or_else(|e| {
58-
panic!(
59-
"client was not successfully initialized: {}", e
60-
)
61-
})
62-
}
63-
64-
#[cfg(unix)]
65-
/// Initialize a new [`Client`] from raw file descriptor.
66-
pub fn new_from_fd(fd: RawFd) -> Result<Client> {
53+
pub fn new(fd: RawFd) -> Result<Client> {
6754
let conn = ClientConnection::new(fd);
6855

6956
Self::new_client(conn)

0 commit comments

Comments
 (0)