Skip to content

Commit

Permalink
Reformat with tight () hugging
Browse files Browse the repository at this point in the history
  • Loading branch information
DavisVaughan committed Feb 21, 2025
1 parent d25256b commit c075941
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions R/separate-wider.R
Original file line number Diff line number Diff line change
Expand Up @@ -250,10 +250,8 @@ str_separate_wider_delim <- function(
remainder[is.na(remainder) & !is.na(x)] <- ""

problem <- !is.na(x) &
(
(too_few == "debug" & n_pieces < p) |
(too_many == "debug" & n_pieces > p)
)
((too_few == "debug" & n_pieces < p) |
(too_many == "debug" & n_pieces > p))

out[[debug_name(col, names_sep, "ok")]] <- !problem
out[[debug_name(col, names_sep, "pieces")]] <- n_pieces
Expand Down Expand Up @@ -369,10 +367,8 @@ str_separate_wider_position <- function(
if (too_few == "debug" || too_many == "debug") {
separate_warn_debug(col, names_sep, c("ok", "width", "remainder"))
problem <- !is.na(x) &
(
(too_few == "debug" & width < expected_width) |
(too_many == "debug" & width > expected_width)
)
((too_few == "debug" & width < expected_width) |
(too_many == "debug" & width > expected_width))

out[[debug_name(col, names_sep, "width")]] <- width
out[[debug_name(col, names_sep, "remainder")]] <- stringr::str_sub(
Expand Down

0 comments on commit c075941

Please sign in to comment.