mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Elide most 'a lifetimes
This commit is contained in:
parent
35dd1816a9
commit
54c036cd66
33 changed files with 126 additions and 126 deletions
|
@ -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()
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue