actix / actix-web

Actix Web is a powerful, pragmatic, and extremely fast web framework for Rust.
https://actix.rs
Apache License 2.0
21.44k stars 1.66k forks source link

[actix-web/src/helpers.rs] Make `MutWriter` `pub`lic #3401

Closed SamuelMarks closed 3 months ago

SamuelMarks commented 3 months ago

PR Type

Feature

PR Checklist

Overview

Due to insufficient document I usually run through your codebase to find the best way of doing things. For example, to impl actix_web::ResponseError for my error type, I see: https://github.com/actix/actix-web/blob/5e29726/actix-web/src/error/response_error.rs#L43

Which uses your pub(crate) MutWriter; which I cannot use. This PR makes it usable. Can you consider either merging this PR or changing the body of actix-web/src/error/response_error.rs to only use public types / functions / symbols?

🙏

robjtede commented 3 months ago

If it's important for your app to have the minor optimization then I'd encourage you to copy this small snippet to your code. I don't want to make any public API guarantees about this type, though.

Thanks for the contribution, all the same.