Skip to content

Commit

Permalink
execution-core: added must_use
Browse files Browse the repository at this point in the history
  • Loading branch information
miloszm committed Jul 9, 2024
1 parent 9b58889 commit 3e207db
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions execution-core/src/bytecode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,13 @@ pub struct Bytecode {

impl Bytecode {
/// Provides contribution bytes for an external hash.
#[must_use]
pub fn to_hash_input_bytes(&self) -> Vec<u8> {
self.hash.to_vec()
}

/// Serializes this object into a variable length buffer
#[must_use]
pub fn to_var_bytes(&self) -> Vec<u8> {
let mut bytes = Vec::new();
bytes.extend(self.hash);
Expand Down

0 comments on commit 3e207db

Please sign in to comment.