We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
&str
1 parent ad9dab3 commit 1045057Copy full SHA for 1045057
types/src/error.rs
@@ -73,8 +73,8 @@ impl<'a> ErrorObject<'a> {
73
}
74
75
/// Create a new [`ErrorObject`] with optional data.
76
- pub fn borrowed(code: i32, message: &'a impl AsRef<str>, data: Option<&'a RawValue>) -> ErrorObject<'a> {
77
- ErrorObject { code: code.into(), message: StdCow::Borrowed(message.as_ref()), data: data.map(StdCow::Borrowed) }
+ pub fn borrowed(code: i32, message: &'a str, data: Option<&'a RawValue>) -> ErrorObject<'a> {
+ ErrorObject { code: code.into(), message: StdCow::Borrowed(message), data: data.map(StdCow::Borrowed) }
78
79
80
/// Take ownership of the parameters within, if we haven't already.
0 commit comments