try! -> ?
Automated conversion using the untry tool [1] and the following command: ``` $ find -name '*.rs' -type f | xargs untry ``` at the root of the Rust repo. [1]: https://github.com/japaric/untry
This commit is contained in:
parent
0dcc413e42
commit
0f02309e4b
132 changed files with 3755 additions and 3770 deletions
|
@ -240,7 +240,7 @@ impl Utf8Error {
|
|||
/// ```
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
pub fn from_utf8(v: &[u8]) -> Result<&str, Utf8Error> {
|
||||
try!(run_utf8_validation(v));
|
||||
run_utf8_validation(v)?;
|
||||
Ok(unsafe { from_utf8_unchecked(v) })
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue