about summary refs log tree commit diff
diff options
context:
space:
mode:
authorgennyble <gen@nyble.dev>2023-07-15 19:00:17 -0500
committergennyble <gen@nyble.dev>2023-07-15 19:00:17 -0500
commit9b71f91b6992c7f003d7d5ef80f4abb980f3d1d4 (patch)
tree66b9dba833698393ba2a95db777f6140ed8aaea1
parent33280b7c9e8f982d8f22ee793489025448ee2694 (diff)
downloadgifed-9b71f91b6992c7f003d7d5ef80f4abb980f3d1d4.tar.gz
gifed-9b71f91b6992c7f003d7d5ef80f4abb980f3d1d4.zip
use bit constants for disposal match
-rw-r--r--gifed/src/block/extension/graphiccontrol.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/gifed/src/block/extension/graphiccontrol.rs b/gifed/src/block/extension/graphiccontrol.rs
index 31cc961..578fa99 100644
--- a/gifed/src/block/extension/graphiccontrol.rs
+++ b/gifed/src/block/extension/graphiccontrol.rs
@@ -41,10 +41,10 @@ impl GraphicControl {
 	/// is recognized, or None if it was set to a reserved value.
 	pub fn disposal_method(&self) -> Option<DisposalMethod> {
 		match self.packed.disposal_method() {
-			0 => Some(DisposalMethod::NoAction),
-			1 => Some(DisposalMethod::DoNotDispose),
-			2 => Some(DisposalMethod::RestoreBackground),
-			3 => Some(DisposalMethod::RestorePrevious),
+			0b000 => Some(DisposalMethod::NoAction),
+			0b001 => Some(DisposalMethod::DoNotDispose),
+			0b010 => Some(DisposalMethod::RestoreBackground),
+			0b011 => Some(DisposalMethod::RestorePrevious),
 			_ => None,
 		}
 	}