aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorFuwn <[email protected]>2023-04-02 01:28:47 +0000
committerFuwn <[email protected]>2023-04-02 01:28:47 +0000
commit63249d1077a6c46da32e468c5c85e97c52115826 (patch)
tree2804c348894fb20d3164dc4218b35ef24ca3ba85 /src
parentrefactor(src): clean up string generics (diff)
downloadwindmark-63249d1077a6c46da32e468c5c85e97c52115826.tar.xz
windmark-63249d1077a6c46da32e468c5c85e97c52115826.zip
feat(respones): accept generic bytes for binary_success
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()
}