Skip to content

Commit 07fbdef

Browse files
committed
Add full stops to rustdocs in jsonrpc
Use AI to go through every file in jsonrpc and add missing full stops to the rust docs.
1 parent 6f92d18 commit 07fbdef

File tree

4 files changed

+16
-16
lines changed

4 files changed

+16
-16
lines changed

jsonrpc/src/client.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
//! # Client support
44
//!
55
//! Support for connecting to JSONRPC servers over HTTP, sending requests,
6-
//! and parsing responses
6+
//! and parsing responses.
77
88
use std::borrow::Cow;
99
use std::collections::HashMap;
@@ -44,7 +44,7 @@ impl Client {
4444

4545
/// Builds a request.
4646
///
47-
/// To construct the arguments, one can use one of the shorthand methods
47+
/// To construct the arguments, one can use one of the shorthand methods.
4848
/// [`crate::arg`] or [`crate::try_arg`].
4949
pub fn build_request<'a>(&self, method: &'a str, params: Option<&'a RawValue>) -> Request<'a> {
5050
let nonce = self.nonce.fetch_add(1, atomic::Ordering::Relaxed);

jsonrpc/src/error.rs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,23 +14,23 @@ use crate::Response;
1414
#[derive(Debug)]
1515
#[non_exhaustive]
1616
pub enum Error {
17-
/// A transport error
17+
/// A transport error.
1818
Transport(Box<dyn error::Error + Send + Sync>),
19-
/// Json error
19+
/// Json error.
2020
Json(serde_json::Error),
21-
/// Error response
21+
/// Error response.
2222
Rpc(RpcError),
23-
/// Response to a request did not have the expected nonce
23+
/// Response to a request did not have the expected nonce.
2424
NonceMismatch,
25-
/// Response to a request had a jsonrpc field other than "2.0"
25+
/// Response to a request had a jsonrpc field other than "2.0".
2626
VersionMismatch,
27-
/// Batches can't be empty
27+
/// Batches can't be empty.
2828
EmptyBatch,
29-
/// Too many responses returned in batch
29+
/// Too many responses returned in batch.
3030
WrongBatchResponseSize,
31-
/// Batch response contained a duplicate ID
31+
/// Batch response contained a duplicate ID.
3232
BatchDuplicateResponseId(serde_json::Value),
33-
/// Batch response contained an ID that didn't correspond to any request ID
33+
/// Batch response contained an ID that didn't correspond to any request ID.
3434
WrongBatchResponseId(serde_json::Value),
3535
}
3636

@@ -79,7 +79,7 @@ impl error::Error for Error {
7979
}
8080

8181
/// Standard error responses, as described at at
82-
/// <http://www.jsonrpc.org/specification#error_object>
82+
/// <http://www.jsonrpc.org/specification#error_object>.
8383
///
8484
/// # Documentation Copyright
8585
/// Copyright (C) 2007-2010 by the JSON-RPC Working Group

jsonrpc/src/http/minreq_http.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ const DEFAULT_TIMEOUT_SECONDS: u64 = 1;
2828
pub struct MinreqHttpTransport {
2929
/// URL of the RPC server.
3030
url: String,
31-
/// timeout only supports second granularity.
31+
/// Timeout only supports second granularity.
3232
timeout: Duration,
3333
/// The value of the `Authorization` HTTP header, i.e., a base64 encoding of 'user:password'.
3434
basic_auth: Option<String>,

jsonrpc/src/http/simple_http.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -470,7 +470,7 @@ pub enum Error {
470470
},
471471
/// The HTTP response started with a HTTP/1.1 line which was not ASCII.
472472
HttpResponseNonAsciiHello(Vec<u8>),
473-
/// The HTTP response did not start with HTTP/1.1
473+
/// The HTTP response did not start with HTTP/1.1.
474474
HttpResponseBadHello {
475475
/// Actual HTTP-whatever string.
476476
actual: String,
@@ -488,7 +488,7 @@ pub enum Error {
488488
/// Our hard maximum on number of bytes we'll try to read.
489489
max: u64,
490490
},
491-
/// The server is replying with chunked encoding which is not supported
491+
/// The server is replying with chunked encoding which is not supported.
492492
HttpResponseChunked,
493493
/// Unexpected HTTP error code (non-200).
494494
HttpErrorCode(u16),
@@ -727,7 +727,7 @@ mod tests {
727727
}
728728

729729
/// Test that the client will detect that a socket is closed and open a fresh one before sending
730-
/// the request
730+
/// the request.
731731
#[cfg(all(not(feature = "proxy"), not(jsonrpc_fuzz)))]
732732
#[test]
733733
fn request_to_closed_socket() {

0 commit comments

Comments
 (0)