actix-web icon indicating copy to clipboard operation
actix-web copied to clipboard

actix-test: re-export types from awc

Open mpalmer opened this issue 1 year ago • 4 comments

PR Type

... Other, I guess?

PR Checklist

  • [x] Tests for the changes have been added / updated.
  • [x] Documentation comments have been added / updated.
  • [x] A changelog entry has been made for the appropriate packages.
  • [x] Format code with the latest stable rustfmt.
  • [ ] (Team) Label with affected crates and semver status.

Overview

At present, if you want to be able to pass (for example) the response from srv.get()... to a function (so you can, say, parse out the response body and parse it as HTML), you've got to add awc as a dependency and use the types from there.

This change re-exports these awc types directly, to avoid the need for the extra dependency, as well as the risk of dependencies getting out of sync and laying waste to the landscape.

mpalmer avatar May 04 '24 07:05 mpalmer

I'm not seeing the relationship between my PR and the CI failures; my changes don't seem to relate to TlsConnectorService at all...

mpalmer avatar May 04 '24 09:05 mpalmer

I think those test failures are related to rust 1.78, which just released and is now better at detecting unused code

asonix avatar May 04 '24 13:05 asonix

Well, I'm glad it's not my fault, because I had no idea how to fix it. :grinning: I guess a merge/rebase/whatever once the underlying problem is sorted will green up CI to clear for merge.

mpalmer avatar May 04 '24 21:05 mpalmer

Working on a fix for the build failures: https://github.com/actix/actix-web/pull/3350

asonix avatar May 04 '24 21:05 asonix

Thanks, this is a fair enough improvement 👍🏻

robjtede avatar May 18 '24 18:05 robjtede