@@ -176,7 +176,7 @@ impl Default for ParseOption {
176
176
177
177
/// Newline style
178
178
#[ derive( Debug , Copy , Clone , Eq , PartialEq ) ]
179
- pub enum LineSpearator {
179
+ pub enum LineSeparator {
180
180
/// System-dependent line separator
181
181
///
182
182
/// On UNIX system, uses "\n"
@@ -196,19 +196,19 @@ static DEFAULT_LINE_SEPARATOR: &str = "\n";
196
196
#[ cfg( windows) ]
197
197
static DEFAULT_LINE_SEPARATOR : & str = "\r \n " ;
198
198
199
- impl fmt:: Display for LineSpearator {
199
+ impl fmt:: Display for LineSeparator {
200
200
fn fmt ( & self , f : & mut fmt:: Formatter ) -> Result < ( ) , fmt:: Error > {
201
201
f. write_str ( self . as_str ( ) )
202
202
}
203
203
}
204
204
205
- impl LineSpearator {
205
+ impl LineSeparator {
206
206
/// String representation
207
207
pub fn as_str ( & self ) -> & ' static str {
208
208
match * self {
209
- LineSpearator :: SystemDefault => DEFAULT_LINE_SEPARATOR ,
210
- LineSpearator :: CR => "\n " ,
211
- LineSpearator :: CRLF => "\r \n " ,
209
+ LineSeparator :: SystemDefault => DEFAULT_LINE_SEPARATOR ,
210
+ LineSeparator :: CR => "\n " ,
211
+ LineSeparator :: CRLF => "\r \n " ,
212
212
}
213
213
}
214
214
}
@@ -219,13 +219,13 @@ pub struct WriteOption {
219
219
pub escape_policy : EscapePolicy ,
220
220
221
221
/// Newline style
222
- pub line_separator : LineSpearator ,
222
+ pub line_separator : LineSeparator ,
223
223
}
224
224
225
225
impl Default for WriteOption {
226
226
fn default ( ) -> WriteOption {
227
227
WriteOption { escape_policy : EscapePolicy :: Basics ,
228
- line_separator : LineSpearator :: SystemDefault }
228
+ line_separator : LineSeparator :: SystemDefault }
229
229
}
230
230
}
231
231
0 commit comments