@@ -466,49 +466,6 @@ impl SequenceData {
466
466
}
467
467
}
468
468
469
- // pub fn filter<F>(&mut self, filter: &mut F) -> Result<()>
470
- // where
471
- // F: FnMut(SymbolicExpression) -> Result<bool>,
472
- // {
473
- // // Note: this macro can probably get removed once
474
- // // ```Vec::drain_filter<F>(&mut self, filter: F) -> DrainFilter<T, F>```
475
- // // is available in rust stable channel (experimental at this point).
476
- // macro_rules! drain_filter {
477
- // ($data:expr, $seq_type:ident) => {
478
- // let mut i = 0;
479
- // while i != $data.data.len() {
480
- // let atom_value =
481
- // SymbolicExpression::atom_value($seq_type::to_value(&$data.data[i])?);
482
- // match filter(atom_value) {
483
- // Ok(res) if res == false => {
484
- // $data.data.remove(i);
485
- // }
486
- // Ok(_) => {
487
- // i += 1;
488
- // }
489
- // Err(err) => return Err(err),
490
- // }
491
- // }
492
- // };
493
- // }
494
-
495
- // match self {
496
- // SequenceData::Buffer(mut data) => {
497
- // drain_filter!(data, BuffData);
498
- // }
499
- // SequenceData::List(mut data) => {
500
- // drain_filter!(data, ListData);
501
- // }
502
- // SequenceData::String(CharType::ASCII(mut data)) => {
503
- // drain_filter!(data, ASCIIData);
504
- // }
505
- // SequenceData::String(CharType::UTF8(mut data)) => {
506
- // drain_filter!(data, UTF8Data);
507
- // }
508
- // }
509
- // Ok(())
510
- // }
511
-
512
469
pub fn concat (
513
470
& mut self ,
514
471
epoch : & StacksEpochId ,
@@ -926,7 +883,7 @@ impl Value {
926
883
}
927
884
928
885
/// # Errors
929
- /// - [`CodecError::ValueTooLarge` if `buff_data` is too large.
886
+ /// - [`CodecError::ValueTooLarge`] if `buff_data` is too large.
930
887
pub fn buff_from ( buff_data : Vec < u8 > ) -> Result < Value , CodecError > {
931
888
// check the buffer size
932
889
BufferLength :: try_from ( buff_data. len ( ) ) ?;
0 commit comments