We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Result
RpcClient::new
1 parent a952d2d commit 3c8f728Copy full SHA for 3c8f728
lightning-block-sync/src/rpc.rs
@@ -50,13 +50,13 @@ impl RpcClient {
50
/// Creates a new RPC client connected to the given endpoint with the provided credentials. The
51
/// credentials should be a base64 encoding of a user name and password joined by a colon, as is
52
/// required for HTTP basic access authentication.
53
- pub fn new(credentials: &str, endpoint: HttpEndpoint) -> std::io::Result<Self> {
54
- Ok(Self {
+ pub fn new(credentials: &str, endpoint: HttpEndpoint) -> Self {
+ Self {
55
basic_auth: "Basic ".to_string() + credentials,
56
endpoint,
57
client: Mutex::new(None),
58
id: AtomicUsize::new(0),
59
- })
+ }
60
}
61
62
/// Calls a method with the response encoded in JSON format and interpreted as type `T`.
0 commit comments