Move LowercaseString near its only consumer.

This commit is contained in:
Ms2ger 2016-06-05 13:20:53 +02:00
parent 06a1d04ca6
commit c2e8916168
2 changed files with 24 additions and 24 deletions

View file

@ -5,7 +5,6 @@
use num_traits::ToPrimitive;
use std::convert::AsRef;
use std::iter::{Filter, Peekable};
use std::ops::Deref;
use std::str::Split;
pub type StaticCharVec = &'static [char];
@ -117,28 +116,6 @@ pub fn read_exponent<I: Iterator<Item=char>>(mut iter: Peekable<I>) -> Option<i3
}
}
#[derive(Clone, Eq, PartialEq, Hash, Debug, Deserialize, Serialize)]
pub struct LowercaseString {
inner: String,
}
impl LowercaseString {
pub fn new(s: &str) -> LowercaseString {
LowercaseString {
inner: s.to_lowercase(),
}
}
}
impl Deref for LowercaseString {
type Target = str;
#[inline]
fn deref(&self) -> &str {
&*self.inner
}
}
pub fn str_join<I, T>(strs: I, join: &str) -> String
where I: IntoIterator<Item=T>, T: AsRef<str>,
{