Skip to content

Commit

Permalink
chore: fix spelling
Browse files Browse the repository at this point in the history
  • Loading branch information
Boshen committed Oct 16, 2023
1 parent 3688f6a commit 1f1eb6c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion crates/oxc_codegen/src/gen.rs
Original file line number Diff line number Diff line change
Expand Up @@ -960,7 +960,7 @@ fn print_non_negative_float<const MINIFY: bool>(value: f64, _p: &Codegen<{ MINIF
let len = chars.len();
let dot = chars.iter().position(|&c| c == b'.');
let u8_to_string = |num: &[u8]| {
// SAFETY: criterias of `from_utf8_unchecked`.are met.
// SAFETY: criteria of `from_utf8_unchecked`.are met.
unsafe { String::from_utf8_unchecked(num.to_vec()) }
};

Expand Down
4 changes: 2 additions & 2 deletions crates/oxc_codegen/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ impl<const MINIFY: bool> Codegen<MINIFY> {
}

pub fn into_code(self) -> String {
// SAFETY: criterias of `from_utf8_unchecked`.are met.
// SAFETY: criteria of `from_utf8_unchecked`.are met.
unsafe { String::from_utf8_unchecked(self.code) }
}

Expand Down Expand Up @@ -154,7 +154,7 @@ impl<const MINIFY: bool> Codegen<MINIFY> {
}

fn peek_nth(&self, n: usize) -> Option<char> {
// SAFETY: criterias of `from_utf8_unchecked`.are met.
// SAFETY: criteria of `from_utf8_unchecked`.are met.
unsafe { from_utf8_unchecked(self.code()) }.chars().nth_back(n)
}

Expand Down
2 changes: 1 addition & 1 deletion crates/oxc_formatter/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ impl Formatter {

#[inline]
pub fn into_code(self) -> String {
// SAFETY: criterias of `from_utf8_unchecked`.are met.
// SAFETY: criteria of `from_utf8_unchecked`.are met.
unsafe { String::from_utf8_unchecked(self.code) }
}

Expand Down

0 comments on commit 1f1eb6c

Please sign in to comment.