@@ -36,15 +36,16 @@ impl Error {
36
36
/// The first character in the input and any characters immediately
37
37
/// following a newline character are in column 1.
38
38
///
39
- /// Note that errors may occur in column 0, for example if a read from an IO
40
- /// stream fails immediately following a previously read newline character.
39
+ /// Note that errors may occur in column 0, for example if a read from an
40
+ /// I/O stream fails immediately following a previously read newline
41
+ /// character.
41
42
pub fn column ( & self ) -> usize {
42
43
self . err . column
43
44
}
44
45
45
46
/// Categorizes the cause of this error.
46
47
///
47
- /// - `Category::Io` - failure to read or write bytes on an IO stream
48
+ /// - `Category::Io` - failure to read or write bytes on an I/O stream
48
49
/// - `Category::Syntax` - input that is not syntactically valid JSON
49
50
/// - `Category::Data` - input data that is semantically incorrect
50
51
/// - `Category::Eof` - unexpected end of the input data
@@ -76,7 +77,7 @@ impl Error {
76
77
}
77
78
78
79
/// Returns true if this error was caused by a failure to read or write
79
- /// bytes on an IO stream.
80
+ /// bytes on an I/O stream.
80
81
pub fn is_io ( & self ) -> bool {
81
82
self . classify ( ) == Category :: Io
82
83
}
@@ -109,7 +110,7 @@ impl Error {
109
110
/// Categorizes the cause of a `serde_json::Error`.
110
111
#[ derive( Copy , Clone , PartialEq , Eq , Debug ) ]
111
112
pub enum Category {
112
- /// The error was caused by a failure to read or write bytes on an IO
113
+ /// The error was caused by a failure to read or write bytes on an I/O
113
114
/// stream.
114
115
Io ,
115
116
@@ -134,8 +135,8 @@ pub enum Category {
134
135
impl From < Error > for io:: Error {
135
136
/// Convert a `serde_json::Error` into an `io::Error`.
136
137
///
137
- /// JSON syntax and data errors are turned into `InvalidData` IO errors.
138
- /// EOF errors are turned into `UnexpectedEof` IO errors.
138
+ /// JSON syntax and data errors are turned into `InvalidData` I/O errors.
139
+ /// EOF errors are turned into `UnexpectedEof` I/O errors.
139
140
///
140
141
/// ```
141
142
/// use std::io;
@@ -182,7 +183,7 @@ pub(crate) enum ErrorCode {
182
183
/// Catchall for syntax error messages
183
184
Message ( Box < str > ) ,
184
185
185
- /// Some IO error occurred while serializing or deserializing.
186
+ /// Some I/O error occurred while serializing or deserializing.
186
187
Io ( io:: Error ) ,
187
188
188
189
/// EOF while parsing a list.
0 commit comments