about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--gifed/src/block/palette.rs8
-rw-r--r--gifed/src/gif.rs1
-rw-r--r--gifed/src/writer/imagebuilder.rs6
3 files changed, 5 insertions, 10 deletions
diff --git a/gifed/src/block/palette.rs b/gifed/src/block/palette.rs
index 1c660df..b1414b4 100644
--- a/gifed/src/block/palette.rs
+++ b/gifed/src/block/palette.rs
@@ -179,7 +179,7 @@ mod test {
 		vec_tuple_test(vec![(1, 2, 3), (4, 5, 6)], &[1, 2, 3, 4, 5, 6])
 	}
 
-	fn test_n_with_padding(real_count: usize, exected_padding_bytes: usize) {
+	fn test_n_with_padding(real_count: usize, expected_padding_bytes: usize) {
 		let mut palette = Palette::new();
 		let mut expected = vec![];
 
@@ -189,11 +189,7 @@ mod test {
 			expected.extend_from_slice(&[x, x, x])
 		}
 
-		// yes, this is really how I'm doing it. I have... trust issues with
-		// myself and iter::repeat. i hope you understand
-		for _ in 0..exected_padding_bytes {
-			expected.push(0x00);
-		}
+		expected.resize(expected.len() + expected_padding_bytes, 0x00);
 
 		let bytes = palette.as_bytes();
 		assert_eq!(expected, bytes.as_slice())
diff --git a/gifed/src/gif.rs b/gifed/src/gif.rs
index 5b1cfd7..87a310f 100644
--- a/gifed/src/gif.rs
+++ b/gifed/src/gif.rs
@@ -7,7 +7,6 @@ use crate::{
 		Block, CompressedImage, IndexedImage, Palette, ScreenDescriptor, Version,
 	},
 	writer::EncodeBlock,
-	EncodeError,
 };
 
 #[derive(Clone, Debug)]
diff --git a/gifed/src/writer/imagebuilder.rs b/gifed/src/writer/imagebuilder.rs
index 2163477..2cbc0c2 100644
--- a/gifed/src/writer/imagebuilder.rs
+++ b/gifed/src/writer/imagebuilder.rs
@@ -44,9 +44,9 @@ impl ImageBuilder {
 		self
 	}
 
-	/// Time to wait, in hundreths of a second, before this image is drawn
-	pub fn delay(mut self, hundreths: u16) -> Self {
-		self.delay = hundreths;
+	/// Time to wait, in hundredths of a second, before this image is drawn
+	pub fn delay(mut self, hundredths: u16) -> Self {
+		self.delay = hundredths;
 		self
 	}