Generalize Budget tests to work on multi-ix txs

This commit is contained in:
Greg Fitzgerald
2019-03-07 10:15:03 -07:00
parent 9e9c0785e7
commit 5b672f8921
3 changed files with 23 additions and 22 deletions

View File

@ -5,7 +5,7 @@ pub mod bloom;
mod hash_queue;
pub mod loader_utils;
mod native_loader;
mod runtime;
pub mod runtime;
mod status_cache;
#[macro_use]

View File

@ -143,7 +143,7 @@ pub fn has_duplicates<T: PartialEq>(xs: &[T]) -> bool {
}
/// Get mut references to a subset of elements.
fn get_subset_unchecked_mut<'a, T>(xs: &'a mut [T], indexes: &[u8]) -> Vec<&'a mut T> {
pub fn get_subset_unchecked_mut<'a, T>(xs: &'a mut [T], indexes: &[u8]) -> Vec<&'a mut T> {
// Since the compiler doesn't know the indexes are unique, dereferencing
// multiple mut elements is assumed to be unsafe. If, however, all
// indexes are unique, it's perfectly safe. The returned elements will share