diff options
author | Matthias Beyer <mail@beyermatthias.de> | 2021-07-14 17:39:47 +0200 |
---|---|---|
committer | Matthias Beyer <mail@beyermatthias.de> | 2021-07-14 17:39:47 +0200 |
commit | 2b84d12180f42d1ec79b6676749b2583dac945a3 (patch) | |
tree | 73b4aa0169ea32d9bec9faf990fa6353b00bfeab | |
parent | ca83610bc8baf24844da9127078abe3d11f7d74c (diff) |
Remove allocation
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
-rw-r--r-- | src/backend/payload.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/backend/payload.rs b/src/backend/payload.rs index 695ff96..6656b7e 100644 --- a/src/backend/payload.rs +++ b/src/backend/payload.rs @@ -17,7 +17,7 @@ impl Payload { let mime = MimeType::from(mime::TEXT_PLAIN_UTF_8); let timestamp = DateTime::from(chrono::offset::Utc::now()); - Self::new(mime, timestamp).with_content(text.as_bytes().to_vec()) + Self::new(mime, timestamp).with_content(text.into_bytes()) } pub fn with_content(mut self, v: Vec<u8>) -> Self { |