about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/gif.rs8
-rw-r--r--src/writer/imagebuilder.rs4
2 files changed, 6 insertions, 6 deletions
diff --git a/src/gif.rs b/src/gif.rs
index 837de3a..36e64dd 100644
--- a/src/gif.rs
+++ b/src/gif.rs
@@ -148,10 +148,10 @@ pub mod gif {
             .image(
                 ImageBuilder::new(4, 4)
                     .palette(colortable.try_into().unwrap())
-                    .indicies(indicies.clone()),
+                    .indicies(&indicies),
             )
             .unwrap()
-            .image(ImageBuilder::new(4, 4).indicies(indicies))
+            .image(ImageBuilder::new(4, 4).indicies(&indicies))
             .unwrap();
 
         let bytes = actual.build().to_vec();
@@ -175,12 +175,12 @@ pub mod gif {
             .image(
                 ImageBuilder::new(4, 4)
                     .palette(colortable.try_into().unwrap())
-                    .indicies(indicies.clone())
+                    .indicies(&indicies)
                     .disposal_method(DisposalMethod::RestoreBackground)
                     .delay(64),
             )
             .unwrap()
-            .image(ImageBuilder::new(4, 4).indicies(indicies))
+            .image(ImageBuilder::new(4, 4).indicies(&indicies))
             .unwrap()
             .build()
             .to_vec();
diff --git a/src/writer/imagebuilder.rs b/src/writer/imagebuilder.rs
index 1486f16..42c94f8 100644
--- a/src/writer/imagebuilder.rs
+++ b/src/writer/imagebuilder.rs
@@ -97,8 +97,8 @@ impl ImageBuilder {
         }
     }
 
-    pub fn indicies(mut self, indicies: Vec<u8>) -> Self {
-        self.indicies = indicies;
+    pub fn indicies(mut self, indicies: &[u8]) -> Self {
+        self.indicies = indicies.to_vec();
         self
     }