We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 561b0db commit 0048e76Copy full SHA for 0048e76
src/error.rs
@@ -190,7 +190,7 @@ struct ErrorImpl {
190
#[derive(Debug)]
191
pub enum ErrorCode {
192
/// Catchall for syntax error messages
193
- Message(String),
+ Message(Box<str>),
194
195
/// Some IO error occurred while serializing or deserializing.
196
Io(io::Error),
@@ -388,7 +388,7 @@ impl de::Error for Error {
388
Error {
389
err: Box::new(
390
ErrorImpl {
391
- code: ErrorCode::Message(msg.to_string()),
+ code: ErrorCode::Message(msg.to_string().into_boxed_str()),
392
line: 0,
393
column: 0,
394
},
@@ -410,7 +410,7 @@ impl ser::Error for Error {
410
411
412
413
414
415
416
0 commit comments