Skip to content

Commit 9976913

Browse files
committed
inline is_labeller()
1 parent 4a3ffff commit 9976913

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

R/labeller.R

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -229,8 +229,6 @@ label_wrap_gen <- function(width = 25, multi_line = TRUE) {
229229
structure(fun, class = "labeller")
230230
}
231231

232-
is_labeller <- function(x) inherits(x, "labeller")
233-
234232
resolve_labeller <- function(rows, cols, labels) {
235233
if (is.null(cols) && is.null(rows)) {
236234
cli::cli_abort("Supply one of {.arg rows} or {.arg cols}.")
@@ -292,7 +290,7 @@ as_labeller <- function(x, default = label_value, multi_line = TRUE) {
292290
# support it.
293291
default <- dispatch_args(default, multi_line = multi_line)
294292

295-
if (is_labeller(x)) {
293+
if (inherits(x, "labeller")) {
296294
x <- dispatch_args(x, multi_line = multi_line)
297295
x(labels)
298296
} else if (is.function(x)) {

0 commit comments

Comments
 (0)