Skip to content

Commit 39ba38f

Browse files
darsnackToucheSir
andauthored
Don't use Returns
Co-authored-by: Brian Chen <ToucheSir@users.noreply.github.com>
1 parent 80fb0f1 commit 39ba38f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/loading.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ however, attempting to copy a non-zero array to an inactive parameter will throw
8181
Likewise, copying a `src` value of `false` to any `dst` array is valid,
8282
but copying a `src` value of `true` will error.
8383
"""
84-
function loadmodel!(dst, src; filter = Returns(true), cache = Base.IdSet())
84+
function loadmodel!(dst, src; filter = _ -> true, cache = Base.IdSet())
8585
ldsts = _filter_children(filter, functor(dst)[1])
8686
lsrcs = _filter_children(filter, functor(src)[1])
8787
(keys(ldsts) == keys(lsrcs)) ||

0 commit comments

Comments
 (0)