diff options
| author | bors <bors@rust-lang.org> | 2014-05-22 15:16:31 -0700 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2014-05-22 15:16:31 -0700 |
| commit | 87ad19eb78239707f1ceed43e475c6aa052efdbc (patch) | |
| tree | 35940d52f145bca81dcf73e5e7da7f3847ceb413 /src/doc/complement-cheatsheet.md | |
| parent | e402e75f4eb79af09b9451f0f232f994b3e2c998 (diff) | |
| parent | e878721d70349e2055f0ef854085de92e9498fde (diff) | |
| download | rust-87ad19eb78239707f1ceed43e475c6aa052efdbc.tar.gz rust-87ad19eb78239707f1ceed43e475c6aa052efdbc.zip | |
auto merge of #14310 : pcwalton/rust/detildestr-alllibs, r=brson
r? @brson
Diffstat (limited to 'src/doc/complement-cheatsheet.md')
| -rw-r--r-- | src/doc/complement-cheatsheet.md | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/doc/complement-cheatsheet.md b/src/doc/complement-cheatsheet.md index 4670a2922cf..99f7c229d4e 100644 --- a/src/doc/complement-cheatsheet.md +++ b/src/doc/complement-cheatsheet.md @@ -60,8 +60,8 @@ To return an Owned String (StrBuf) use the str helper function [`from_utf8_owned ~~~ use std::str; -let x: Result<StrBuf,~[u8]> = - str::from_utf8_owned(~[104u8,105u8]).map(|x| x.to_strbuf()); +let x: Option<StrBuf> = + str::from_utf8([ 104u8, 105u8 ]).map(|x| x.to_strbuf()); let y: StrBuf = x.unwrap(); ~~~ |
