File tree Expand file tree Collapse file tree 1 file changed +0
-30
lines changed
stackslib/src/chainstate/stacks/index Expand file tree Collapse file tree 1 file changed +0
-30
lines changed Original file line number Diff line number Diff line change @@ -171,20 +171,6 @@ impl From<u32> for MARFValue {
171
171
}
172
172
}
173
173
174
- impl From < u64 > for MARFValue {
175
- fn from ( value : u64 ) -> MARFValue {
176
- let h = value. to_le_bytes ( ) ;
177
- let mut d = [ 0u8 ; MARF_VALUE_ENCODED_SIZE as usize ] ;
178
- if h. len ( ) > MARF_VALUE_ENCODED_SIZE as usize {
179
- panic ! ( "Cannot convert a u64 into a MARF Value." ) ;
180
- }
181
- d. get_mut ( ..h. len ( ) )
182
- . expect ( "Cannot convert a u64 into a MARF Value" )
183
- . copy_from_slice ( & h) ;
184
- MARFValue ( d)
185
- }
186
- }
187
-
188
174
impl < T : MarfTrieId > From < T > for MARFValue {
189
175
fn from ( bhh : T ) -> MARFValue {
190
176
let h = bhh. to_bytes ( ) ;
@@ -215,22 +201,6 @@ impl From<MARFValue> for u32 {
215
201
}
216
202
}
217
203
218
- impl From < MARFValue > for u64 {
219
- fn from ( m : MARFValue ) -> u64 {
220
- let h = m. 0 ;
221
- let mut d = [ 0u8 ; 8 ] ;
222
-
223
- d. copy_from_slice ( & h[ ..8 ] ) ;
224
-
225
- for h_i in & h[ 8 ..] {
226
- if * h_i != 0 {
227
- panic ! ( "Failed to convert MARF value into u64: data stored after 8th byte" ) ;
228
- }
229
- }
230
- u64:: from_le_bytes ( d)
231
- }
232
- }
233
-
234
204
impl MARFValue {
235
205
/// Construct from a TRIEHASH_ENCODED_SIZE-length slice
236
206
pub fn from_value_hash_bytes ( h : & [ u8 ; TRIEHASH_ENCODED_SIZE ] ) -> MARFValue {
You can’t perform that action at this time.
0 commit comments