diff options
author | gennyble <gen@nyble.dev> | 2023-07-15 19:00:17 -0500 |
---|---|---|
committer | gennyble <gen@nyble.dev> | 2023-07-15 19:00:17 -0500 |
commit | 9b71f91b6992c7f003d7d5ef80f4abb980f3d1d4 (patch) | |
tree | 66b9dba833698393ba2a95db777f6140ed8aaea1 | |
parent | 33280b7c9e8f982d8f22ee793489025448ee2694 (diff) | |
download | gifed-9b71f91b6992c7f003d7d5ef80f4abb980f3d1d4.tar.gz gifed-9b71f91b6992c7f003d7d5ef80f4abb980f3d1d4.zip |
use bit constants for disposal match
-rw-r--r-- | gifed/src/block/extension/graphiccontrol.rs | 8 |
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, } } |