Skip to content

Commit

Permalink
chore(codec): Use slice contains method to check if value contained (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
tottoto authored Jul 2, 2024
1 parent cae01b1 commit 0f4fcdd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tonic/src/codec/compression.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ impl EnabledCompressionEncodings {

/// Check if a [`CompressionEncoding`] is enabled.
pub fn is_enabled(&self, encoding: CompressionEncoding) -> bool {
self.inner.iter().any(|e| *e == Some(encoding))
self.inner.contains(&Some(encoding))
}

/// Check if any [`CompressionEncoding`]s are enabled.
Expand Down

0 comments on commit 0f4fcdd

Please sign in to comment.