Skip to content

Commit

Permalink
Added docstrings to RandomMteTag struct
Browse files Browse the repository at this point in the history
  • Loading branch information
fritzrehde committed Nov 24, 2023
1 parent d3102e3 commit 0cfe196
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion cranelift/wasm/src/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -282,8 +282,11 @@ static ALL_POSSIBLE_RANDOM_MTE_TAGS: Lazy<(usize, Vec<u8>)> = Lazy::new(|| {
/// from `EXCLUDED_MTE_TAGS`.
#[derive(Debug)]
struct RandomMteTag {
/// The 4-bit random MTE tag.
tag: u8,
// TODO: we could probably make this a u8 for efficieny as well, but vector.len() natively returns usize, so we use that for now
/// The index that was used to index into `ALL_POSSIBLE_RANDOM_MTE_TAGS` to
/// receive `tag`. This is stored here because it is needed to generate the
/// next random tag.
index: usize,
}

Expand Down

0 comments on commit 0cfe196

Please sign in to comment.