Skip to content

Commit ef43f16

Browse files
committed
i nstead or renaming scratch_dir, use explicit import for @get_scratch!
1 parent 926a465 commit ef43f16

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/init.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using Scratch
1+
using Scratch: @get_scratch!
22
using REPL
33
import Base64
44

@@ -114,7 +114,7 @@ include(_path(backend_name()))
114114
n = length(_examples)
115115
imports = sizehint!(Expr[], n)
116116
examples = sizehint!(Expr[], 10n)
117-
_scratch_dir = mktempdir()
117+
scratch_dir = mktempdir()
118118
for i in setdiff(1:n, _backend_skips[backend_name()], _animation_examples)
119119
_examples[i].external && continue
120120
(imp = _examples[i].imports) === nothing || push!(imports, imp)
@@ -125,7 +125,7 @@ include(_path(backend_name()))
125125
$func() = begin # evaluate each example in a local scope
126126
$(_examples[i].exprs)
127127
$i == 1 || return # only for one example
128-
fn = tempname($_scratch_dir)
128+
fn = tempname($scratch_dir)
129129
pl = current()
130130
show(devnull, pl)
131131
showable(MIME"image/png"(), pl) && savefig(pl, "$fn.png")

0 commit comments

Comments
 (0)