diff options
Diffstat (limited to 'src/parse/mod.rs')
| -rw-r--r-- | src/parse/mod.rs | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/src/parse/mod.rs b/src/parse/mod.rs index c26e0c0..2c578cb 100644 --- a/src/parse/mod.rs +++ b/src/parse/mod.rs @@ -1,4 +1,4 @@ -use crate::{BString, bstr}; +use crate::{BString, bstr, PushAll}; #[cfg(test)] mod test; @@ -562,7 +562,7 @@ pub struct ExpString { } impl ExpString { - fn expand<E: Expander>(self, e: &mut E) -> Res<BString, E::Error> { + pub fn expand<E: Expander>(self, e: &mut E) -> Res<BString, E::Error> { let mut out = BString::new(); for part in self.parts.into_iter() { let mut x = match part { @@ -671,18 +671,6 @@ pub enum StringDelimiter { StrictCustom(BString), } -trait PushAll { - fn push_all(&mut self, other: &bstr); -} - -impl PushAll for BString { - fn push_all(&mut self, other: &bstr) { - for &c in other { - self.push(c); - } - } -} - /// gets the largest ident this slice starts with, might be empty fn peek_ident(b: &[u8]) -> &[u8] { if b.is_empty() || !b[0].is_ascii_alphabetic() { |
