Skip to content

Commit d8b47b4

Browse files
committed
Fixed typo
1 parent 5281f41 commit d8b47b4

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@ Cargo.lock
44
.DS_Store
55
Thumbs.db
66
/.idea
7+
/.vscode

src/ini.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ impl Default for ParseOption {
176176

177177
/// Newline style
178178
#[derive(Debug, Copy, Clone, Eq, PartialEq)]
179-
pub enum LineSpearator {
179+
pub enum LineSeparator {
180180
/// System-dependent line separator
181181
///
182182
/// On UNIX system, uses "\n"
@@ -196,19 +196,19 @@ static DEFAULT_LINE_SEPARATOR: &str = "\n";
196196
#[cfg(windows)]
197197
static DEFAULT_LINE_SEPARATOR: &str = "\r\n";
198198

199-
impl fmt::Display for LineSpearator {
199+
impl fmt::Display for LineSeparator {
200200
fn fmt(&self, f: &mut fmt::Formatter) -> Result<(), fmt::Error> {
201201
f.write_str(self.as_str())
202202
}
203203
}
204204

205-
impl LineSpearator {
205+
impl LineSeparator {
206206
/// String representation
207207
pub fn as_str(&self) -> &'static str {
208208
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",
212212
}
213213
}
214214
}
@@ -219,13 +219,13 @@ pub struct WriteOption {
219219
pub escape_policy: EscapePolicy,
220220

221221
/// Newline style
222-
pub line_separator: LineSpearator,
222+
pub line_separator: LineSeparator,
223223
}
224224

225225
impl Default for WriteOption {
226226
fn default() -> WriteOption {
227227
WriteOption { escape_policy: EscapePolicy::Basics,
228-
line_separator: LineSpearator::SystemDefault }
228+
line_separator: LineSeparator::SystemDefault }
229229
}
230230
}
231231

0 commit comments

Comments
 (0)