Skip to content

Commit e5a4e07

Browse files
committed
remove commented out code
1 parent 733401d commit e5a4e07

File tree

2 files changed

+1
-56
lines changed

2 files changed

+1
-56
lines changed

clarity-serialization/src/types/mod.rs

Lines changed: 1 addition & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -466,49 +466,6 @@ impl SequenceData {
466466
}
467467
}
468468

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-
512469
pub fn concat(
513470
&mut self,
514471
epoch: &StacksEpochId,
@@ -926,7 +883,7 @@ impl Value {
926883
}
927884

928885
/// # Errors
929-
/// - [`CodecError::ValueTooLarge` if `buff_data` is too large.
886+
/// - [`CodecError::ValueTooLarge`] if `buff_data` is too large.
930887
pub fn buff_from(buff_data: Vec<u8>) -> Result<Value, CodecError> {
931888
// check the buffer size
932889
BufferLength::try_from(buff_data.len())?;

clarity-serialization/src/types/signatures.rs

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -824,12 +824,6 @@ impl TupleTypeSignature {
824824
}
825825
}
826826

827-
// impl FunctionArg {
828-
// pub fn new(signature: TypeSignature, name: ClarityName) -> FunctionArg {
829-
// FunctionArg { signature, name }
830-
// }
831-
// }
832-
833827
impl TypeSignature {
834828
pub fn empty_buffer() -> Result<TypeSignature> {
835829
Ok(SequenceType(SequenceSubtype::BufferType(
@@ -1563,12 +1557,6 @@ impl fmt::Display for StringUTF8Length {
15631557
}
15641558
}
15651559

1566-
// impl fmt::Display for FunctionArg {
1567-
// fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1568-
// write!(f, "{}", self.signature)
1569-
// }
1570-
// }
1571-
15721560
#[cfg(test)]
15731561
mod test {
15741562
use super::*;

0 commit comments

Comments
 (0)