Elide most 'a lifetimes

This commit is contained in:
Manish Goregaokar 2015-09-04 08:55:51 +05:30
parent 35dd1816a9
commit 54c036cd66
33 changed files with 126 additions and 126 deletions

View file

@ -25,7 +25,7 @@ impl ByteString {
/// Returns `self` as a string, if it encodes valid UTF-8, and `None`
/// otherwise.
pub fn as_str<'a>(&'a self) -> Option<&'a str> {
pub fn as_str(&self) -> Option<&str> {
let ByteString(ref vec) = *self;
str::from_utf8(&vec).ok()
}