Skip to content

Commit 3c8f728

Browse files
committed
Drop unnecessary Result in RpcClient::new
.. as it's infallible
1 parent a952d2d commit 3c8f728

File tree

1 file changed

+3
-3
lines changed
  • lightning-block-sync/src

1 file changed

+3
-3
lines changed

lightning-block-sync/src/rpc.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,13 @@ impl RpcClient {
5050
/// Creates a new RPC client connected to the given endpoint with the provided credentials. The
5151
/// credentials should be a base64 encoding of a user name and password joined by a colon, as is
5252
/// required for HTTP basic access authentication.
53-
pub fn new(credentials: &str, endpoint: HttpEndpoint) -> std::io::Result<Self> {
54-
Ok(Self {
53+
pub fn new(credentials: &str, endpoint: HttpEndpoint) -> Self {
54+
Self {
5555
basic_auth: "Basic ".to_string() + credentials,
5656
endpoint,
5757
client: Mutex::new(None),
5858
id: AtomicUsize::new(0),
59-
})
59+
}
6060
}
6161

6262
/// Calls a method with the response encoded in JSON format and interpreted as type `T`.

0 commit comments

Comments
 (0)