Rustfmt
This commit is contained in:
@@ -219,10 +219,9 @@ impl ConstantPool {
|
|||||||
/// replacing any existing constant values. use `set` to tie a specific `const42` to its value;
|
/// replacing any existing constant values. use `set` to tie a specific `const42` to its value;
|
||||||
/// use `insert` to add a value and return the next available `const` entity.
|
/// use `insert` to add a value and return the next available `const` entity.
|
||||||
pub fn set(&mut self, constant_handle: Constant, constant_value: ConstantData) {
|
pub fn set(&mut self, constant_handle: Constant, constant_value: ConstantData) {
|
||||||
let replaced = self.handles_to_values.insert(
|
let replaced = self
|
||||||
constant_handle,
|
.handles_to_values
|
||||||
constant_value.clone(),
|
.insert(constant_handle, constant_value.clone());
|
||||||
);
|
|
||||||
assert!(
|
assert!(
|
||||||
replaced.is_none(),
|
replaced.is_none(),
|
||||||
"attempted to overwrite an existing constant {:?}: {:?} => {:?}",
|
"attempted to overwrite an existing constant {:?}: {:?} => {:?}",
|
||||||
|
|||||||
Reference in New Issue
Block a user