Skip to content

Commit ca71391

Browse files
a few more
1 parent 5c6ea1a commit ca71391

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

R/nest.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -292,9 +292,9 @@ add_attributes_caching <- function(pd_flat, transformers, more_specs) {
292292
pd_flat$block <- rep(NA, nrow(pd_flat))
293293
pd_flat$is_cached <- rep(FALSE, nrow(pd_flat))
294294
if (cache_is_activated()) {
295-
is_parent <- pd_flat$parent == 0
295+
is_parent <- pd_flat$parent == 0L
296296
pd_flat$is_cached[is_parent] <- map_lgl(
297-
pd_flat$text[pd_flat$parent == 0],
297+
pd_flat$text[pd_flat$parent == 0L],
298298
is_cached, transformers,
299299
more_specs = more_specs
300300
)

R/transform-block.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ parse_transform_serialize_r_block <- function(pd_nested,
7676
cache_find_block <- function(pd) {
7777
first_after_cache_state_switch <- pd$is_cached != lag(pd$is_cached, default = !pd$is_cached[1L])
7878

79-
not_first_on_line <- find_blank_lines_to_next_expr(pd) == 0
79+
not_first_on_line <- find_blank_lines_to_next_expr(pd) == 0L
8080
invalid_turning_point_idx <- which(
8181
not_first_on_line & first_after_cache_state_switch
8282
)

R/transform-files.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,7 @@ apply_transformers <- function(pd_nested, transformers) {
377377
#' Needed for reverse engineering the scope.
378378
#' @keywords internal
379379
parse_tree_must_be_identical <- function(transformers) {
380-
length(transformers$token) == 0
380+
length(transformers$token) == 0L
381381
}
382382

383383
#' Verify the styling

R/utils-cache.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ cache_by_expression <- function(text,
163163
# which the indention
164164
# was removed via parse, same as it is in cache_by_expression) and add the
165165
# base indention.
166-
expressions[expressions$parent == 0 & expressions$token != "COMMENT" & !expressions$stylerignore, "text"] %>%
166+
expressions[expressions$parent == 0L & expressions$token != "COMMENT" & !expressions$stylerignore, "text"] %>%
167167
map(~ cache_write(.x, transformers = transformers, more_specs))
168168
}
169169

0 commit comments

Comments
 (0)