summaryrefslogtreecommitdiffstats
path: root/native/src/svg.rs
diff options
context:
space:
mode:
Diffstat (limited to 'native/src/svg.rs')
-rw-r--r--native/src/svg.rs11
1 files changed, 2 insertions, 9 deletions
diff --git a/native/src/svg.rs b/native/src/svg.rs
index c89eed3f..d4d20182 100644
--- a/native/src/svg.rs
+++ b/native/src/svg.rs
@@ -25,15 +25,8 @@ impl Handle {
///
/// This is useful if you already have your SVG data in-memory, maybe
/// because you downloaded or generated it procedurally.
- pub fn from_memory(bytes: impl Into<Vec<u8>>) -> Handle {
- Self::from_data(Data::Bytes(Cow::Owned(bytes.into())))
- }
-
- /// Like [`Handle::from_memory`], but from static image data.
- ///
- /// Useful for images included in binary, for instance with [`include_bytes!`].
- pub fn from_static_memory(bytes: &'static [u8]) -> Handle {
- Self::from_data(Data::Bytes(Cow::Borrowed(bytes)))
+ pub fn from_memory(bytes: impl Into<Cow<'static, [u8]>>) -> Handle {
+ Self::from_data(Data::Bytes(bytes.into()))
}
fn from_data(data: Data) -> Handle {