Skip to content

Commit 9dd32bf

Browse files
committed
Use arg_match0 for simple cases
1 parent 4b999fb commit 9dd32bf

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

R/io.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ transform_utf8 <- function(path, fun, dry) {
1919
#' styling are not identical.
2020
#' @keywords internal
2121
transform_utf8_one <- function(path, fun, dry) {
22-
rlang::arg_match(dry, c("on", "off", "fail"))
22+
rlang::arg_match0(dry, c("on", "off", "fail"))
2323
rlang::try_fetch(
2424
{
2525
file_with_info <- read_utf8(path)

R/testing.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ n_times_faster_with_cache <- function(x1, x2 = x1, ...,
237237
fun = styler::style_text,
238238
n = 3L,
239239
clear = "always") {
240-
rlang::arg_match(clear, c("always", "final", "never", "all but last"))
240+
rlang::arg_match0(clear, c("always", "final", "never", "all but last"))
241241

242242
out <- purrr::map(1L:n, n_times_faster_bench,
243243
x1 = x1, x2 = x2, fun = fun,

R/ui-caching.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ NULL
9393
#' @family cache managers
9494
#' @export
9595
cache_info <- function(cache_name = NULL, format = "both") {
96-
rlang::arg_match(format, c("tabular", "lucid", "both"))
96+
rlang::arg_match0(format, c("tabular", "lucid", "both"))
9797
path_cache <- cache_find_path(cache_name)
9898
files <- list.files(path_cache, full.names = TRUE)
9999
file_info <- file.info(files)

0 commit comments

Comments
 (0)