diff options
| author | Laurenz <laurmaedje@gmail.com> | 2019-03-11 18:02:47 +0100 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2019-03-11 18:02:47 +0100 |
| commit | 77e52996673e1c3aa7a8beae4d1ee7eb9be0bafb (patch) | |
| tree | 19184c9a2ebfae58fe422a290e8678b6317729f2 /src/utility.rs | |
| parent | 67281c4f469716c7f2341676f2ad656d8c544ea3 (diff) | |
Tidy up PDF crate 🧹
Diffstat (limited to 'src/utility.rs')
| -rw-r--r-- | src/utility.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/utility.rs b/src/utility.rs index a0e6a295..4e6bc7d9 100644 --- a/src/utility.rs +++ b/src/utility.rs @@ -1,7 +1,7 @@ //! Utility functionality. -use std::str::Split; use std::iter::Peekable; +use std::str::Split; use unicode_xid::UnicodeXID; @@ -29,6 +29,7 @@ pub trait Splinor { } impl Splinor for str { + #[inline] fn spline<'s, T: Clone>(&'s self, pat: &'s str, splinor: T) -> Spline<'s, T> { Spline { splinor: Splined::Splinor(splinor), @@ -60,6 +61,7 @@ pub enum Splined<'s, T> { impl<'s, T: Clone> Iterator for Spline<'s, T> { type Item = Splined<'s, T>; + #[inline] fn next(&mut self) -> Option<Splined<'s, T>> { if self.next_splinor && self.split.peek().is_some() { self.next_splinor = false; @@ -87,6 +89,7 @@ impl StrExt for str { self.chars().all(|c| c.is_whitespace() && c != '\n') } + #[inline] fn is_identifier(&self) -> bool { let mut chars = self.chars(); |
