From 16f24ba1f010d978e60ff4b5f61bdc8ec08df63d Mon Sep 17 00:00:00 2001 From: Michael Chirico Date: Tue, 30 Dec 2025 10:50:44 -0800 Subject: [PATCH] Use get0 to simplify get_seed() --- R/seed.R | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/R/seed.R b/R/seed.R index 9a5c17a..2191241 100644 --- a/R/seed.R +++ b/R/seed.R @@ -96,11 +96,8 @@ has_seed <- function() { } get_seed <- function() { - if (!has_seed()) { - return(NULL) - } list( - random_seed = get(".Random.seed", globalenv(), mode = "integer", inherits = FALSE), + random_seed = get0(".Random.seed", globalenv(), mode = "integer", inherits = FALSE), rng_kind = RNGkind() ) }