Skip to content

Commit

Permalink
docs: fix a few spelling issues (#2478)
Browse files Browse the repository at this point in the history
  • Loading branch information
nyurik authored Dec 23, 2024
1 parent 3ce98b5 commit ea48da7
Show file tree
Hide file tree
Showing 15 changed files with 31 additions and 31 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ jobs:
needs: [style]

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

steps:
Expand Down
14 changes: 7 additions & 7 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
- Add `impl Service<http::Request<Body>>` for `Client` and `&'_ Client`.
- Add support for `!Sync` bodies in `Body::wrap_stream()`.
- Enable happy eyeballs when `hickory-dns` is used.
- Fix `Proxy` so that `HTTP(S)_PROXY` values take precendence over `ALL_PROXY`.
- Fix `Proxy` so that `HTTP(S)_PROXY` values take precedence over `ALL_PROXY`.
- Fix `blocking::RequestBuilder::header()` from unsetting `sensitive` on passed header values.

## v0.12.5
Expand Down Expand Up @@ -390,7 +390,7 @@

## v0.9.17

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

## v0.9.16

Expand All @@ -409,8 +409,8 @@

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

## v0.9.13
Expand Down Expand Up @@ -536,7 +536,7 @@

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

# v0.9.0

Expand Down Expand Up @@ -745,7 +745,7 @@

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

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

### Breaking Changes

Expand Down
2 changes: 1 addition & 1 deletion examples/wasm_github_fetch/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use wasm_bindgen::prelude::*;
// NOTE: This test is a clone of https://github.com/rustwasm/wasm-bindgen/blob/master/examples/fetch/src/lib.rs
// but uses Reqwest instead of the web_sys fetch api directly

/// A struct to hold some data from the github Branch API.
/// A struct to hold some data from the GitHub Branch API.
///
/// Note how we don't have to define every member -- serde will ignore extra
/// data when deserializing
Expand Down
8 changes: 4 additions & 4 deletions src/async_impl/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -800,7 +800,7 @@ impl ClientBuilder {
accepts: config.accepts,
#[cfg(feature = "cookies")]
cookie_store: config.cookie_store,
// Use match instead of map since config is partially moved
// Use match instead of map since config is partially moved,
// and it cannot be used in closure
#[cfg(feature = "http3")]
h3_client: match h3_connector {
Expand Down Expand Up @@ -1647,7 +1647,7 @@ impl ClientBuilder {

/// Set the minimum required TLS version for connections.
///
/// By default the TLS backend's own default is used.
/// By default, the TLS backend's own default is used.
///
/// # Errors
///
Expand Down Expand Up @@ -1676,7 +1676,7 @@ impl ClientBuilder {

/// Set the maximum allowed TLS version for connections.
///
/// By default there's no maximum.
/// By default, there's no maximum.
///
/// # Errors
///
Expand Down Expand Up @@ -2739,7 +2739,7 @@ impl Future for PendingRequest {
if should_redirect {
let loc = res.headers().get(LOCATION).and_then(|val| {
let loc = (|| -> Option<Url> {
// Some sites may send a utf-8 Location header,
// Some sites may send a UTF-8 Location header,
// even though we're supposed to treat those bytes
// as opaque, we'll check specifically for utf8.
self.url.join(str::from_utf8(val.as_bytes()).ok()?).ok()
Expand Down
2 changes: 1 addition & 1 deletion src/async_impl/multipart.rs
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@ impl<P: PartProps> FormParts<P> {
_ => return None,
}
}
// If there is a at least one field there is a special boundary for the very last field.
// If there is at least one field there is a special boundary for the very last field.
if !self.fields.is_empty() {
length += 2 + self.boundary().len() as u64 + 4
}
Expand Down
2 changes: 1 addition & 1 deletion src/async_impl/request.rs
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ impl RequestBuilder {
match <HeaderName as TryFrom<K>>::try_from(key) {
Ok(key) => match <HeaderValue as TryFrom<V>>::try_from(value) {
Ok(mut value) => {
// We want to potentially make an unsensitive header
// We want to potentially make an non-sensitive header
// to be sensitive, not the reverse. So, don't turn off
// a previously sensitive header.
if sensitive {
Expand Down
2 changes: 1 addition & 1 deletion src/async_impl/response.rs
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ impl Response {
///
/// # Errors
///
/// This method fails whenever the response body is not in JSON format
/// This method fails whenever the response body is not in JSON format,
/// or it cannot be properly deserialized to target type `T`. For more
/// details please see [`serde_json::from_reader`].
///
Expand Down
2 changes: 1 addition & 1 deletion src/blocking/body.rs
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ async fn send_future(sender: Sender) -> Result<(), crate::Error> {
//
// We need to know whether there is any data to send before
// we check the transmission channel (with poll_ready below)
// because sometimes the receiver disappears as soon as is
// because sometimes the receiver disappears as soon as it
// considers the data is completely transmitted, which may
// be true.
//
Expand Down
10 changes: 5 additions & 5 deletions src/blocking/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ impl ClientBuilder {

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

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

/// Set the minimum required TLS version for connections.
///
/// By default the TLS backend's own default is used.
/// By default, the TLS backend's own default is used.
///
/// # Errors
///
Expand Down Expand Up @@ -800,7 +800,7 @@ impl ClientBuilder {

/// Set the maximum allowed TLS version for connections.
///
/// By default there's no maximum.
/// By default, there's no maximum.
///
/// # Errors
///
Expand Down
2 changes: 1 addition & 1 deletion src/blocking/multipart.rs
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ impl Form {
}

// If predictable, computes the length the request will have
// The length should be preditable if only String and file fields have been added,
// The length should be predictable if only String and file fields have been added,
// but not if a generic reader has been added;
pub(crate) fn compute_length(&mut self) -> Option<u64> {
self.inner.compute_length()
Expand Down
2 changes: 1 addition & 1 deletion src/blocking/request.rs
Original file line number Diff line number Diff line change
Expand Up @@ -614,7 +614,7 @@ impl RequestBuilder {
/// # }
/// ```
///
/// With a non-clonable body
/// With a non-cloneable body
///
/// ```rust
/// # fn run() -> Result<(), Box<dyn std::error::Error>> {
Expand Down
2 changes: 1 addition & 1 deletion src/blocking/response.rs
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ impl Response {
///
/// # Errors
///
/// This method fails whenever the response body is not in JSON format
/// This method fails whenever the response body is not in JSON format,
/// or it cannot be properly deserialized to target type `T`. For more
/// details please see [`serde_json::from_reader`].
///
Expand Down
6 changes: 3 additions & 3 deletions src/proxy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,7 @@ impl NoProxy {
/// * Any other entry is considered a domain name (and may contain a leading dot, for example `google.com`
/// and `.google.com` are equivalent) and would match both that domain AND all subdomains.
///
/// For example, if `"NO_PROXY=google.com, 192.168.1.0/24"` was set, all of the following would match
/// For example, if `"NO_PROXY=google.com, 192.168.1.0/24"` was set, all the following would match
/// (and therefore would bypass the proxy):
/// * `http://google.com/`
/// * `http://www.google.com/`
Expand Down Expand Up @@ -872,7 +872,7 @@ impl Dst for Uri {
///
/// All platforms will check for proxy settings via environment variables.
/// If those aren't set, platform-wide proxy settings will be looked up on
/// Windows and MacOS platforms instead. Errors encountered while discovering
/// Windows and macOS platforms instead. Errors encountered while discovering
/// these settings are ignored.
///
/// Returns:
Expand Down Expand Up @@ -956,7 +956,7 @@ fn is_cgi() -> bool {
fn get_from_platform_impl() -> Result<Option<String>, Box<dyn Error>> {
let internet_setting = windows_registry::CURRENT_USER
.open("Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings")?;
// ensure the proxy is enable, if the value doesn't exist, an error will returned.
// ensure the proxy is enabled, if the value doesn't exist, an error will be returned.
let proxy_enable = internet_setting.get_u32("ProxyEnable")?;
let proxy_server = internet_setting.get_string("ProxyServer")?;

Expand Down
2 changes: 1 addition & 1 deletion src/tls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ impl Identity {
/// Parses a chain of PEM encoded X509 certificates, with the leaf certificate first.
/// `key` is a PEM encoded PKCS #8 formatted private key for the leaf certificate.
///
/// The certificate chain should contain any intermediate cerficates that should be sent to
/// The certificate chain should contain any intermediate certificates that should be sent to
/// clients to allow them to build a chain to a trusted root.
///
/// A certificate chain here means a series of PEM encoded certificates concatenated together.
Expand Down
4 changes: 2 additions & 2 deletions tests/blocking.rs
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ fn test_post_form() {
}

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

/// Calling `Response::error_for_status`` on a response with status in 5xx
/// returns a error.
/// returns an error.
#[test]
fn test_error_for_status_5xx() {
let server = server::http(move |_req| async {
Expand Down

0 comments on commit ea48da7

Please sign in to comment.