Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The latest version of
utoipa-swagger-ui
introduced a dependence onreqwest
at build-time just to download a single file.That feels unnecessarily heavy, considering it's intended to be a one-off download thing, and
reqwest
pulls in the entirety of hyper, tokio, mio, and all supporting libraries of that.This PR replaces it with
minreq
which has a smaller dependency tree.The difference here is that
minreq
buffers the entire body into memory, but I checked the size of the archive and 4MB seem like a fine amount to buffer in memory.If it isn't, then we can switch to
ureq
which offers anio::Read
based interface, so it streams the response (but it is a little heavier on dependencies thanminreq
, but not by much).