eigenein / my-iot-rs

Yet another home automation (alpha)
https://eigenein.github.io/my-iot-rs/html
MIT License
32 stars 5 forks source link

⬆️ Bump surf from 2.0.0-alpha.7 to 2.0.0 #167

Closed dependabot[bot] closed 3 years ago

dependabot[bot] commented 3 years ago

Bumps surf from 2.0.0-alpha.7 to 2.0.0.

Release notes

Sourced from surf's releases.

2.0.0

Docs

This major release of Surf contains substantial improvements through a variety of changes and additions.

(Note: this is a cumulative list of changes since Surf 1.0.3)

Notable mentions include:

  • Uses stable standard library [futures][]!
  • Much more type compatibility with [Tide][] via [http-types][]!
  • Re-usable Client which is able to make use of connection pooling under the hood.
  • Reduced generics for Client and Middleware.
  • Re-worked Middleware to use [async_trait][].

Major Changes

Surf 2 contains some large API changes, as noted here:

http-types

Surf has switched the common backing type interface (surf::http) from the [http][] (hyperium/http) crate to [http-types][], which covers a larger set of HTTP-related functionality than hyperium/http does, and allows Surf to use the [url standard][].

This affects any type that came from surf::http, such as StatusCode ([old][StatusCode http]|[new][StatusCode http-types]), and includes some new patterns, such as [Body][].

For more information, see this blog post.

Errors

surf::Exception, which was a plain Box<dyn Error + Send + Sync + 'static>, is no more.

Surf now exports a structured [surf::Error][] type, which holds a StatusCode alongside a dynamic error object. Just like [anyhow][], any error can be cast to this type using the ? operator.

For more information, see this blog post.

Middleware

New middleware:

use surf::middleware::{Middleware, Next};
use surf::{Client, Request, Response, Result};

#[surf::utils::async_trait] impl Middleware for Logger { async fn handle( &self, req: Request, client: Client, next: Next<'_>, ) -> Result<Response> { Ok(res) </tr></table>

... (truncated)

Changelog

Sourced from surf's changelog.

[2.0.0] - 2020-10-05

Docs

This major release of Surf contains substantial improvements through a variety of changes and additions.

(Note: this is a cumulative list of changes since Surf 1.0.3)

Notable mentions include:

  • Uses stable standard library [futures][]!
  • Much more type compatibility with [Tide][] via [http-types][]!
  • Re-usable Client which is able to make use of connection pooling under the hood.
  • Reduced generics for Client and Middleware.
  • Re-worked Middleware to use [async_trait][].

Major Changes

Surf 2 contains some large API changes, as noted here:

http-types

Surf has switched the common backing type interface (surf::http) from the [http][] (hyperium/http) crate to [http-types][], which covers a larger set of HTTP-related functionality than hyperium/http does, and allows Surf to use the [url standard][].

This affects any type that came from surf::http, such as StatusCode ([old][StatusCode http]|[new][StatusCode http-types]), and includes some new patterns, such as [Body][].

For more information, see this blog post.

Errors

surf::Exception, which was a plain Box<dyn Error + Send + Sync + 'static>, is no more.

Surf now exports a structured [surf::Error][] type, which holds a StatusCode alongside a dynamic error object. Just like [anyhow][], any error can be cast to this type using the ? operator.

For more information, see this blog post.

Middleware

New middleware:

use surf::middleware::{Middleware, Next};
use surf::{Client, Request, Response, Result};

#[surf::utils::async_trait] impl Middleware for Logger { async fn handle( &self, req: Request, client: Client, next: Next<'_>, ) -> Result<Response> { </tr></table>

... (truncated)

Commits
  • eb6eaf9 2.0.0
  • c1feba5 meta: changelog for alpha.7
  • 3e6ab70 Merge pull request #249 from jbr/no-url-direct-dep
  • 30edbd3 removed url from direct deps and updated doctests
  • 9cfe1f3 remove url crate re-export
  • 10178c5 Merge pull request #247 from Fishrock123/client-send-no-boxedfuture
  • 9e438c0 Client, RB: remove BoxFuture from .send()
  • c66f051 Merge pull request #246 from Fishrock123/requestbuilder-query
  • a5f337b Request: use http-types for querystring handling
  • ed75ad9 RequestBuilder: add .query()
  • See full diff in compare view


Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
dependabot[bot] commented 3 years ago

Superseded by #181.