Skip to content

Commit ea48da7

Browse files
authored
docs: fix a few spelling issues (#2478)
1 parent 3ce98b5 commit ea48da7

File tree

15 files changed

+31
-31
lines changed

15 files changed

+31
-31
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ jobs:
244244
needs: [style]
245245

246246
# Use Ubuntu 20.04 here, because latest (22.04) uses OpenSSL v3.
247-
# Currently OpenSSL v3 causes compile issues with openssl-sys
247+
# Currently, OpenSSL v3 causes compile issues with openssl-sys
248248
runs-on: ubuntu-20.04
249249

250250
steps:

CHANGELOG.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
- Add `impl Service<http::Request<Body>>` for `Client` and `&'_ Client`.
2525
- Add support for `!Sync` bodies in `Body::wrap_stream()`.
2626
- Enable happy eyeballs when `hickory-dns` is used.
27-
- Fix `Proxy` so that `HTTP(S)_PROXY` values take precendence over `ALL_PROXY`.
27+
- Fix `Proxy` so that `HTTP(S)_PROXY` values take precedence over `ALL_PROXY`.
2828
- Fix `blocking::RequestBuilder::header()` from unsetting `sensitive` on passed header values.
2929

3030
## v0.12.5
@@ -390,7 +390,7 @@
390390

391391
## v0.9.17
392392

393-
- Fix `Cookie` headers so as to not include attributes from the `Set-Cookie` (like `HttpOnly`, `Secure`, etc).
393+
- Fix `Cookie` headers to not include attributes from the `Set-Cookie` (like `HttpOnly`, `Secure`, etc.)
394394

395395
## v0.9.16
396396

@@ -409,8 +409,8 @@
409409

410410
- Add optional support for SOCKS5 proxies, by enabling the `socks5` cargo feature.
411411
- Add Cookie Store support to `Client`, automatically handling cookies for a session.
412-
* Add `ClientBuilder::cookie_store(enable: bool)` method to enable a cookie store that persists across requests.
413-
* Add `Response::cookies()` accessor that allows iterating over response cookies.
412+
- Add `ClientBuilder::cookie_store(enable: bool)` method to enable a cookie store that persists across requests.
413+
- Add `Response::cookies()` accessor that allows iterating over response cookies.
414414
- Fix `Proxy` to check the URL for a username and password.
415415

416416
## v0.9.13
@@ -536,7 +536,7 @@
536536

537537
- Fix large request bodies failing because of improper handling of backpressure.
538538
- Remove body-related headers when redirect changes a `POST` into a `GET`.
539-
- Reduce memory size of `Response` and `Error` signicantly.
539+
- Reduce memory size of `Response` and `Error` significantly.
540540

541541
# v0.9.0
542542

@@ -745,7 +745,7 @@
745745

746746
- Proxy support (#30)
747747
- Self-signed TLS certificates (#97)
748-
- Disabling TLS hostname validation   (#89)
748+
- Disabling TLS hostname validation (#89)
749749
- A `Request` type that can be used instead of the `RequestBuilder` (#85)
750750
- Add `Response::error_for_status()` to easily convert 400 and 500 status responses into an `Error` (#98)
751751
- Upgrade hyper to 0.11
@@ -758,7 +758,7 @@
758758
### Fixes
759759

760760
- Publicly exports `RedirectAction` and `RedirectAttempt`
761-
- `Error::get_ref` returns `Error + Send + Sync`
761+
- `Error::get_ref` returns `Error + Send + Sync`
762762

763763
### Breaking Changes
764764

examples/wasm_github_fetch/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use wasm_bindgen::prelude::*;
44
// NOTE: This test is a clone of https://github.com/rustwasm/wasm-bindgen/blob/master/examples/fetch/src/lib.rs
55
// but uses Reqwest instead of the web_sys fetch api directly
66

7-
/// A struct to hold some data from the github Branch API.
7+
/// A struct to hold some data from the GitHub Branch API.
88
///
99
/// Note how we don't have to define every member -- serde will ignore extra
1010
/// data when deserializing

src/async_impl/client.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -800,7 +800,7 @@ impl ClientBuilder {
800800
accepts: config.accepts,
801801
#[cfg(feature = "cookies")]
802802
cookie_store: config.cookie_store,
803-
// Use match instead of map since config is partially moved
803+
// Use match instead of map since config is partially moved,
804804
// and it cannot be used in closure
805805
#[cfg(feature = "http3")]
806806
h3_client: match h3_connector {
@@ -1647,7 +1647,7 @@ impl ClientBuilder {
16471647

16481648
/// Set the minimum required TLS version for connections.
16491649
///
1650-
/// By default the TLS backend's own default is used.
1650+
/// By default, the TLS backend's own default is used.
16511651
///
16521652
/// # Errors
16531653
///
@@ -1676,7 +1676,7 @@ impl ClientBuilder {
16761676

16771677
/// Set the maximum allowed TLS version for connections.
16781678
///
1679-
/// By default there's no maximum.
1679+
/// By default, there's no maximum.
16801680
///
16811681
/// # Errors
16821682
///
@@ -2739,7 +2739,7 @@ impl Future for PendingRequest {
27392739
if should_redirect {
27402740
let loc = res.headers().get(LOCATION).and_then(|val| {
27412741
let loc = (|| -> Option<Url> {
2742-
// Some sites may send a utf-8 Location header,
2742+
// Some sites may send a UTF-8 Location header,
27432743
// even though we're supposed to treat those bytes
27442744
// as opaque, we'll check specifically for utf8.
27452745
self.url.join(str::from_utf8(val.as_bytes()).ok()?).ok()

src/async_impl/multipart.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,7 @@ impl<P: PartProps> FormParts<P> {
417417
_ => return None,
418418
}
419419
}
420-
// If there is a at least one field there is a special boundary for the very last field.
420+
// If there is at least one field there is a special boundary for the very last field.
421421
if !self.fields.is_empty() {
422422
length += 2 + self.boundary().len() as u64 + 4
423423
}

src/async_impl/request.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ impl RequestBuilder {
209209
match <HeaderName as TryFrom<K>>::try_from(key) {
210210
Ok(key) => match <HeaderValue as TryFrom<V>>::try_from(value) {
211211
Ok(mut value) => {
212-
// We want to potentially make an unsensitive header
212+
// We want to potentially make an non-sensitive header
213213
// to be sensitive, not the reverse. So, don't turn off
214214
// a previously sensitive header.
215215
if sensitive {

src/async_impl/response.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ impl Response {
257257
///
258258
/// # Errors
259259
///
260-
/// This method fails whenever the response body is not in JSON format
260+
/// This method fails whenever the response body is not in JSON format,
261261
/// or it cannot be properly deserialized to target type `T`. For more
262262
/// details please see [`serde_json::from_reader`].
263263
///

src/blocking/body.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ async fn send_future(sender: Sender) -> Result<(), crate::Error> {
296296
//
297297
// We need to know whether there is any data to send before
298298
// we check the transmission channel (with poll_ready below)
299-
// because sometimes the receiver disappears as soon as is
299+
// because sometimes the receiver disappears as soon as it
300300
// considers the data is completely transmitted, which may
301301
// be true.
302302
//

src/blocking/client.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ impl ClientBuilder {
208208

209209
/// Enable auto gzip decompression by checking the `Content-Encoding` response header.
210210
///
211-
/// If auto gzip decompresson is turned on:
211+
/// If auto gzip decompression is turned on:
212212
///
213213
/// - When sending a request and if the request's headers do not already contain
214214
/// an `Accept-Encoding` **and** `Range` values, the `Accept-Encoding` header is set to `gzip`.
@@ -274,7 +274,7 @@ impl ClientBuilder {
274274

275275
/// Enable auto deflate decompression by checking the `Content-Encoding` response header.
276276
///
277-
/// If auto deflate decompresson is turned on:
277+
/// If auto deflate decompression is turned on:
278278
///
279279
/// - When sending a request and if the request's headers do not already contain
280280
/// an `Accept-Encoding` **and** `Range` values, the `Accept-Encoding` header is set to `deflate`.
@@ -360,7 +360,7 @@ impl ClientBuilder {
360360
/// Clear all `Proxies`, so `Client` will use no proxy anymore.
361361
///
362362
/// # Note
363-
/// To add a proxy exclusion list, use [crate::proxy::Proxy::no_proxy()]
363+
/// To add a proxy exclusion list, use [Proxy::no_proxy()]
364364
/// on all desired proxies instead.
365365
///
366366
/// This also disables the automatic usage of the "system" proxy.
@@ -772,7 +772,7 @@ impl ClientBuilder {
772772

773773
/// Set the minimum required TLS version for connections.
774774
///
775-
/// By default the TLS backend's own default is used.
775+
/// By default, the TLS backend's own default is used.
776776
///
777777
/// # Errors
778778
///
@@ -800,7 +800,7 @@ impl ClientBuilder {
800800

801801
/// Set the maximum allowed TLS version for connections.
802802
///
803-
/// By default there's no maximum.
803+
/// By default, there's no maximum.
804804
///
805805
/// # Errors
806806
///

src/blocking/multipart.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ impl Form {
149149
}
150150

151151
// If predictable, computes the length the request will have
152-
// The length should be preditable if only String and file fields have been added,
152+
// The length should be predictable if only String and file fields have been added,
153153
// but not if a generic reader has been added;
154154
pub(crate) fn compute_length(&mut self) -> Option<u64> {
155155
self.inner.compute_length()

src/blocking/request.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -614,7 +614,7 @@ impl RequestBuilder {
614614
/// # }
615615
/// ```
616616
///
617-
/// With a non-clonable body
617+
/// With a non-cloneable body
618618
///
619619
/// ```rust
620620
/// # fn run() -> Result<(), Box<dyn std::error::Error>> {

src/blocking/response.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ impl Response {
230230
///
231231
/// # Errors
232232
///
233-
/// This method fails whenever the response body is not in JSON format
233+
/// This method fails whenever the response body is not in JSON format,
234234
/// or it cannot be properly deserialized to target type `T`. For more
235235
/// details please see [`serde_json::from_reader`].
236236
///

src/proxy.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -458,7 +458,7 @@ impl NoProxy {
458458
/// * Any other entry is considered a domain name (and may contain a leading dot, for example `google.com`
459459
/// and `.google.com` are equivalent) and would match both that domain AND all subdomains.
460460
///
461-
/// For example, if `"NO_PROXY=google.com, 192.168.1.0/24"` was set, all of the following would match
461+
/// For example, if `"NO_PROXY=google.com, 192.168.1.0/24"` was set, all the following would match
462462
/// (and therefore would bypass the proxy):
463463
/// * `http://google.com/`
464464
/// * `http://www.google.com/`
@@ -872,7 +872,7 @@ impl Dst for Uri {
872872
///
873873
/// All platforms will check for proxy settings via environment variables.
874874
/// If those aren't set, platform-wide proxy settings will be looked up on
875-
/// Windows and MacOS platforms instead. Errors encountered while discovering
875+
/// Windows and macOS platforms instead. Errors encountered while discovering
876876
/// these settings are ignored.
877877
///
878878
/// Returns:
@@ -956,7 +956,7 @@ fn is_cgi() -> bool {
956956
fn get_from_platform_impl() -> Result<Option<String>, Box<dyn Error>> {
957957
let internet_setting = windows_registry::CURRENT_USER
958958
.open("Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings")?;
959-
// ensure the proxy is enable, if the value doesn't exist, an error will returned.
959+
// ensure the proxy is enabled, if the value doesn't exist, an error will be returned.
960960
let proxy_enable = internet_setting.get_u32("ProxyEnable")?;
961961
let proxy_server = internet_setting.get_string("ProxyServer")?;
962962

src/tls.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ impl Identity {
282282
/// Parses a chain of PEM encoded X509 certificates, with the leaf certificate first.
283283
/// `key` is a PEM encoded PKCS #8 formatted private key for the leaf certificate.
284284
///
285-
/// The certificate chain should contain any intermediate cerficates that should be sent to
285+
/// The certificate chain should contain any intermediate certificates that should be sent to
286286
/// clients to allow them to build a chain to a trusted root.
287287
///
288288
/// A certificate chain here means a series of PEM encoded certificates concatenated together.

tests/blocking.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ fn test_post_form() {
159159
}
160160

161161
/// Calling `Response::error_for_status`` on a response with status in 4xx
162-
/// returns a error.
162+
/// returns an error.
163163
#[test]
164164
fn test_error_for_status_4xx() {
165165
let server = server::http(move |_req| async {
@@ -178,7 +178,7 @@ fn test_error_for_status_4xx() {
178178
}
179179

180180
/// Calling `Response::error_for_status`` on a response with status in 5xx
181-
/// returns a error.
181+
/// returns an error.
182182
#[test]
183183
fn test_error_for_status_5xx() {
184184
let server = server::http(move |_req| async {

0 commit comments

Comments
 (0)