Skip to content
This repository has been archived by the owner on Jan 4, 2023. It is now read-only.

Commit

Permalink
Impl Hash for Instruction (#32)
Browse files Browse the repository at this point in the history
`Instruction` sould reflect the same implementations as `Opcode`. The
former doesn't implement `Hash`, while the latter does.

`Hash` is mandatory if the structure is to be used with map-like
implementations. That way, having that implementation for `Instruction`
is desirable.
  • Loading branch information
vlopes11 authored Nov 30, 2021
1 parent 4d581b7 commit 9b36447
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/instruction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use fuel_types::{Immediate06, Immediate12, Immediate18, Immediate24, RegisterId,
use std::{io, iter};

/// A version of Opcode that can used without unnecessary branching
#[derive(Debug, Default, Clone, Copy, PartialEq, Eq)]
#[derive(Debug, Default, Clone, Copy, PartialEq, Eq, Hash)]
#[cfg_attr(
feature = "serde-types-minimal",
derive(serde::Serialize, serde::Deserialize)
Expand Down

0 comments on commit 9b36447

Please sign in to comment.