aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/response.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/response.rs b/src/response.rs
index c693ac8..6feecf5 100644
--- a/src/response.rs
+++ b/src/response.rs
@@ -86,10 +86,10 @@ impl Response {
#[must_use]
pub fn binary_success(
- content: &[u8],
+ content: impl AsRef<[u8]>,
mime: impl Into<String> + AsRef<str>,
) -> Self {
- Self::new(21, String::from_utf8_lossy(content))
+ Self::new(21, String::from_utf8_lossy(content.as_ref()))
.with_mime(mime)
.clone()
}