Skip to content

Commit

Permalink
comment out unused method
Browse files Browse the repository at this point in the history
  • Loading branch information
neithanmo committed Jun 4, 2024
1 parent 46ea860 commit 29072f2
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions bolos-derive/src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
********************************************************************************/
use proc_macro_error::emit_error;
use syn::{
punctuated::Punctuated, spanned::Spanned, visit::Visit, Attribute, Error, GenericArgument,
punctuated::Punctuated, spanned::Spanned, visit::Visit, Attribute, GenericArgument,
GenericParam, Generics, Ident, Type, TypePath,
};

Expand All @@ -31,20 +31,20 @@ pub trait SynIteratorExtend: Iterator {
})
}

fn syn_try_fold<C, T>(mut self) -> Result<C, Error>
where
Self: Sized,
Self: Iterator<Item = Result<T, Error>>,
C: Extend<T> + Default,
{
self.try_fold(C::default(), |mut acc, x| match x {
Ok(x) => {
acc.extend(std::iter::once(x));
Ok(acc)
}
Err(e) => Err(e),
})
}
// fn syn_try_fold<C, T>(mut self) -> Result<C, Error>
// where
// Self: Sized,
// Self: Iterator<Item = Result<T, Error>>,
// C: Extend<T> + Default,
// {
// self.try_fold(C::default(), |mut acc, x| match x {
// Ok(x) => {
// acc.extend(std::iter::once(x));
// Ok(acc)
// }
// Err(e) => Err(e),
// })
// }
}

impl<I: Iterator> SynIteratorExtend for I {}
Expand Down

0 comments on commit 29072f2

Please sign in to comment.