Upgrading actix-web 2 to 3
Breaking2.0.0 → 3.3.3Breaking19Platform5Deprecated1New12Changed18Fixed6Other1
BreakingUpgrade verdict
16 breaking changes and 5 platform requirement changes.
In plain terms
- Renames `IntoHeaderValue::try_into` to `try_into_value` to avoid ambiguity with std `TryInto`.
- Removes `HttpResponseBuilder::json2()`.
- `HeaderMap::insert` now returns an iterator of removed values.
- A method for setting a response header was removed; use the new insert_header method instead.
Must act Top 5 of 22 that need code or config changes
What you must change
Breaking16
Renames
IntoHeaderValue::try_into to try_into_value to avoid ambiguity with std TryInto.IntoHeaderValue::try_intoIntoHeaderValue::try_into_valueTryIntoRemoves
HttpResponseBuilder::json2().HttpResponseBuilder::json2HeaderMap::insert now returns an iterator of removed values.HeaderMap::insertHeaderMap::removeRemoves ResponseBuilder::set; use ResponseBuilder::insert_header instead.
ResponseBuilder::setResponseBuilder::insert_headerResponseBuilder::set_headerRemoves ResponseBuilder::header; use ResponseBuilder::append_header instead.
ResponseBuilder::headerResponseBuilder::append_headerRemoves TestRequest::with_hdr; use TestRequest::default().insert_header() instead.
TestRequest::with_hdrTestRequest::default()insert_header()TestRequest::with_headerRemoves the actors optional feature.
actorsRemoves the ResponseError impl for actix::MailboxError.
ResponseErroractix::MailboxErrorRemoves deprecated
on_connect methods; use the new on_connect_ext technique instead.on_connecton_connect_extRemoves the
ResponseError impl for actix::actors::resolver::ResolverError due to deprecation of the resolver actor.ResponseErroractix::actors::resolver::ResolverErrorRemoves
ConnectError::SslHandshakeError and the HandshakeError re-export; openssl handshake errors now return as ConnectError::SslError.ConnectError::SslHandshakeErrorHandshakeErrorConnectError::SslErrorRemoves the
failure feature and its support.failureclient::error::ConnectError Resolver variant now contains a Box<dyn std::error::Error> type.client::error::ConnectErrorSimplifies
BlockingError to a unit struct, now only triggered when the blocking thread pool is dead.BlockingErrorHeaderMap::len now returns the number of values instead of the number of keys.HeaderMap::lenThe
ws::Message::Text enum variant now contains a bytestring::ByteString.ws::Message::Textbytestring::ByteStringPlatform5
Raises the minimum supported Rust version (MSRV) to 1.88.
Raises the minimum supported Rust version (MSRV) to 1.68 due to a transitive
time dependency.Raises the minimum supported Rust version (MSRV) to 1.59.
Raises the minimum supported Rust version (MSRV) to 1.57 due to the transitive
time dependency.Bumps the minimum supported Rust version to 1.40.
Deprecations to plan for
Deprecated1
Soft-deprecates NormalizePath::default(), noting an upcoming behavior change in v4.
NormalizePath::default()