Skip to content

Commit

Permalink
rustup
Browse files Browse the repository at this point in the history
  • Loading branch information
BurntSushi committed Jan 1, 2015
1 parent 30b1a37 commit c8f43f9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/bytestr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ impl ByteString {
pub fn into_utf8_string(self) -> Result<String, ByteString> {
// FIXME: Figure out how to return an error here.
String::from_utf8(self.into_bytes())
.map_err(|(bytes, _)| ByteString(bytes))
.map_err(|err| ByteString(err.into_bytes()))
}

/// Return the number of bytes in the string.
Expand Down

0 comments on commit c8f43f9

Please sign in to comment.