Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix wording in documentation #259

Merged
merged 1 commit into from
Jan 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/module/globals.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,12 @@ impl ModuleGlobals {
})
}

/// Gets a reference to a memory given its id
/// Gets a reference to a global given its id
pub fn get(&self, id: GlobalId) -> &Global {
&self.arena[id]
}

/// Gets a reference to a memory given its id
/// Gets a reference to a global given its id
pub fn get_mut(&mut self, id: GlobalId) -> &mut Global {
&mut self.arena[id]
}
Expand Down
6 changes: 3 additions & 3 deletions src/module/locals.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,17 @@ impl ModuleLocals {
id
}

/// Get the local for an ID
/// Gets a reference to a local given its id
pub fn get(&self, id: LocalId) -> &Local {
&self.arena[id]
}

/// Get the set of locals for this module.
/// Gets a reference to a local given its id
pub fn get_mut(&mut self, id: LocalId) -> &mut Local {
&mut self.arena[id]
}

/// Get a shared reference to this module's globals.
/// Get a shared reference to this module's locals.
pub fn iter(&self) -> impl Iterator<Item = &Local> {
self.arena.iter().map(|(_, f)| f)
}
Expand Down
Loading