Skip to content

Commit 4f2b172

Browse files
committed
Use common header method in subscript errors
1 parent c6a9553 commit 4f2b172

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

NAMESPACE

+1-2
Original file line numberDiff line numberDiff line change
@@ -110,9 +110,8 @@ S3method(cnd_header,vctrs_error_matches_remaining)
110110
S3method(cnd_header,vctrs_error_names_cannot_be_dot_dot)
111111
S3method(cnd_header,vctrs_error_names_cannot_be_empty)
112112
S3method(cnd_header,vctrs_error_names_must_be_unique)
113+
S3method(cnd_header,vctrs_error_subscript)
113114
S3method(cnd_header,vctrs_error_subscript_oob)
114-
S3method(cnd_header,vctrs_error_subscript_size)
115-
S3method(cnd_header,vctrs_error_subscript_type)
116115
S3method(diff,vctrs_vctr)
117116
S3method(duplicated,vctrs_sclr)
118117
S3method(duplicated,vctrs_vctr)

R/subscript.R

+1-5
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ new_error_subscript_type <- function(i,
174174
}
175175

176176
#' @export
177-
cnd_header.vctrs_error_subscript_type <- function(cnd) {
177+
cnd_header.vctrs_error_subscript <- function(cnd) {
178178
arg <- cnd[["subscript_arg"]]
179179
if (is_subscript_arg(arg)) {
180180
with <- glue::glue(" with {format_subscript_arg(arg)}")
@@ -233,10 +233,6 @@ new_error_subscript_size <- function(i,
233233
...
234234
)
235235
}
236-
#' @export
237-
cnd_header.vctrs_error_subscript_size <- function(cnd, ...) {
238-
cnd_header.vctrs_error_subscript_type(cnd, ...)
239-
}
240236

241237
new_error_subscript2_type <- function(i,
242238
numeric,

0 commit comments

Comments
 (0)