Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Small documentation improvements for compression middleware #472

Merged
merged 1 commit into from
Feb 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion tower-http/src/compression/layer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ where
}

impl CompressionLayer {
/// Create a new [`CompressionLayer`]
/// Creates a new [`CompressionLayer`].
pub fn new() -> Self {
Self::default()
}
Expand Down
10 changes: 7 additions & 3 deletions tower-http/src/compression_utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -404,12 +404,16 @@ pub enum CompressionLevel {
Fastest,
/// Best quality of compression, usually produces the smallest size.
Best,
/// Default quality of compression defined by the selected compression algorithm.
/// Default quality of compression defined by the selected compression
/// algorithm.
#[default]
Default,
/// Precise quality based on the underlying compression algorithms'
/// qualities. The interpretation of this depends on the algorithm chosen
/// and the specific implementation backing it.
/// qualities.
///
/// The interpretation of this depends on the algorithm chosen and the
/// specific implementation backing it.
///
/// Qualities are implicitly clamped to the algorithm's maximum.
Precise(i32),
}
Expand Down
Loading