Skip to content

Commit

Permalink
Remove backports (#672)
Browse files Browse the repository at this point in the history
  • Loading branch information
DavisVaughan committed Nov 16, 2019
1 parent d715c69 commit b50e5ee
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
1 change: 0 additions & 1 deletion DESCRIPTION
Expand Up @@ -26,7 +26,6 @@ BugReports: https://github.com/r-lib/vctrs/issues
Depends:
R (>= 3.2)
Imports:
backports,
ellipsis (>= 0.2.0),
digest,
glue,
Expand Down
6 changes: 5 additions & 1 deletion R/utils.R
@@ -1,5 +1,9 @@
str_dup <- function(x, times) {
paste0(rep(x, times = times), collapse = "")
}

indent <- function(x, n) {
pad <- strrep(" ", n)
pad <- str_dup(" ", n)
map_chr(x, gsub, pattern = "(\n+)", replacement = paste0("\\1", pad))
}

Expand Down
2 changes: 0 additions & 2 deletions R/zzz.R
@@ -1,7 +1,5 @@
# nocov start
.onLoad <- function(libname, pkgname) {
backports::import(pkgname, "strrep")

s3_register("generics::as.factor", "vctrs_vctr")
s3_register("generics::as.ordered", "vctrs_vctr")
s3_register("generics::as.difftime", "vctrs_vctr")
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-type.R
Expand Up @@ -57,7 +57,7 @@ test_that("vec_ptype_common() includes index in argument tag", {
df2 <- tibble(x = tibble(y = tibble(z = "a")))

# Create a column name too large for default buffer
nm <- strrep("foobarfoobar", 10)
nm <- str_dup("foobarfoobar", 10)
large_df1 <- set_names(df1, nm)
large_df2 <- set_names(df2, nm)

Expand Down

0 comments on commit b50e5ee

Please sign in to comment.