Skip to content

Commit

Permalink
remove extra restore_slices
Browse files Browse the repository at this point in the history
  • Loading branch information
Aleksander Chlebowski committed Oct 19, 2023
1 parent e2d6355 commit 8250dfb
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions R/teal_slices.R
Original file line number Diff line number Diff line change
Expand Up @@ -139,21 +139,6 @@ c.teal_slices <- function(...) {
}


# this function must be defined in the `teal` namesspace so that it calls `teal::teal_slices`
#' @noRd
#' @keywords internal
#'
slices_restore <- function(file) {
checkmate::assert_file_exists(file, access = "r", extension = "json")

tss_json <- jsonlite::fromJSON(file, simplifyDataFrame = FALSE)

tss_elements <- lapply(tss_json$slices, as.teal_slice)

do.call(teal_slices, c(tss_elements, tss_json$attributes))
}


#' Deep copy `teal_slices`
#'
#' it's important to create a new copy of `teal_slices` when
Expand Down

0 comments on commit 8250dfb

Please sign in to comment.