Skip to content

Commit d5590c6

Browse files
authored
perf: use more compact (#137)
1 parent a0d2158 commit d5590c6

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

R/Callback.R

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,7 @@ Callback = R6Class("Callback",
8181
print = function(...) {
8282
catn(format(self), if (is.null(self$label) || is.na(self$label)) "" else paste0(": ", self$label))
8383
# get methods that start with "on_" and discard null
84-
catn(str_indent("* Active Stages:", names(discard(as.list(self)[grep("^on_.*", names(self), value = TRUE)], is.null))))
85-
84+
catn(str_indent("* Active Stages:", names(compact(as.list(self)[grep("^on_.*", names(self), value = TRUE)]))))
8685
},
8786

8887
#' @description

0 commit comments

Comments
 (0)