summaryrefslogtreecommitdiffstats
path: root/native
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón <hector0193@gmail.com>2023-02-18 22:15:11 +0100
committerLibravatar GitHub <noreply@github.com>2023-02-18 22:15:11 +0100
commit1b79df44337abf46f9ef3fbd2f46a96da952639d (patch)
tree7f0364a768c5662336bbcfb20bdfd171dece22b1 /native
parentf0decca8bcb19965e34abc8187dbf796893c5791 (diff)
parentbf061a0d628e97997f9af744a66239cb03ae6d78 (diff)
downloadiced-1b79df44337abf46f9ef3fbd2f46a96da952639d.tar.gz
iced-1b79df44337abf46f9ef3fbd2f46a96da952639d.tar.bz2
iced-1b79df44337abf46f9ef3fbd2f46a96da952639d.zip
Merge pull request #1717 from iced-rs/remove-clone-image-bytes
Remove `Clone` bound for `Bytes::new` in `image`
Diffstat (limited to 'native')
-rw-r--r--native/src/image.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/native/src/image.rs b/native/src/image.rs
index 4c5e926b..70fbade0 100644
--- a/native/src/image.rs
+++ b/native/src/image.rs
@@ -28,7 +28,7 @@ impl Handle {
pub fn from_pixels(
width: u32,
height: u32,
- pixels: impl AsRef<[u8]> + Clone + Send + Sync + 'static,
+ pixels: impl AsRef<[u8]> + Send + Sync + 'static,
) -> Handle {
Self::from_data(Data::Rgba {
width,
@@ -44,7 +44,7 @@ impl Handle {
/// This is useful if you already have your image loaded in-memory, maybe
/// because you downloaded or generated it procedurally.
pub fn from_memory(
- bytes: impl AsRef<[u8]> + Clone + Send + Sync + 'static,
+ bytes: impl AsRef<[u8]> + Send + Sync + 'static,
) -> Handle {
Self::from_data(Data::Bytes(Bytes::new(bytes)))
}
@@ -93,7 +93,7 @@ pub struct Bytes(Arc<dyn AsRef<[u8]> + Send + Sync + 'static>);
impl Bytes {
/// Creates new [`Bytes`] around `data`.
- pub fn new(data: impl AsRef<[u8]> + Clone + Send + Sync + 'static) -> Self {
+ pub fn new(data: impl AsRef<[u8]> + Send + Sync + 'static) -> Self {
Self(Arc::new(data))
}
}