Skip to content

Commit

Permalink
Merge branch 'feature/completestr-to_string' of https://github.com/my…
Browse files Browse the repository at this point in the history
…rrlyn/nom into myrrlyn-feature/completestr-to_string
  • Loading branch information
Geal committed Apr 9, 2018
2 parents a672f76 + 1bfc689 commit 226bf79
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ use lib::std::ops::{Deref, Range, RangeFrom, RangeFull, RangeTo};
use lib::std::slice::Iter;
use lib::std::str::{self, CharIndices, Chars, FromStr};
use lib::std::convert::From;
use lib::std::fmt::Display;
#[cfg(feature = "alloc")]
use lib::std::string::String;

Expand All @@ -33,6 +34,12 @@ impl<'a, 'b> From<&'b &'a str> for CompleteStr<'a> {
}
}

impl<'a> Display for CompleteStr<'a> {
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
self.0.fmt(f)
}
}

impl<'a> Deref for CompleteStr<'a> {
type Target = &'a str;

Expand Down

0 comments on commit 226bf79

Please sign in to comment.