mirror of
https://github.com/danbulant/oxc
synced 2026-05-22 21:58:36 +00:00
fix(prettier) Fix subtract with overflow (#1314)
This commit is contained in:
parent
5f316626f6
commit
6a062a882f
1 changed files with 1 additions and 1 deletions
|
|
@ -89,7 +89,7 @@ impl<'a> Printer<'a> {
|
|||
}
|
||||
Mode::Break => {
|
||||
#[allow(clippy::cast_possible_wrap)]
|
||||
let remaining_width = (self.options.print_width - self.pos) as isize;
|
||||
let remaining_width = (self.options.print_width as isize) - (self.pos as isize);
|
||||
|
||||
if Self::fits(&docs, remaining_width) {
|
||||
self.cmds.extend(
|
||||
|
|
|
|||
Loading…
Reference in a new issue