Skip to content

Commit ffe84ff

Browse files
JDSeilerdginev
authored andcommitted
Oh turns out we can return &str after all.
1 parent 31d0819 commit ffe84ff

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/error.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,8 @@ impl StructuredError {
100100
/// reporting mechanism. Instead of calling this method, you can access the
101101
/// StructuredError `message` field directly.
102102
#[deprecated(since="0.3.3", note="Please use the `message` field directly instead.")]
103-
pub fn message(&self) -> &String {
104-
self.message.as_ref().unwrap()
103+
pub fn message(&self) -> &str {
104+
self.message.as_ref().unwrap().as_str()
105105
}
106106

107107
/// Returns the provided c_str as Some(String), or None if the provided pointer is null.

0 commit comments

Comments
 (0)