Skip to content

Commit 7256f85

Browse files
committed
cleaner treatment for no loader/saver specification
1 parent c3ff161 commit 7256f85

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/loadsave.jl

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,8 @@ const sym2saver = Dict{Symbol,Vector{Symbol}}()
44
for (appl,fchk,fadd,dct) in ((:applicable_loaders, :check_loader, :add_loader, :sym2loader),
55
(:applicable_savers, :check_saver, :add_saver, :sym2saver))
66
@eval begin
7-
$appl{sym}(::Formatted{DataFormat{sym}}) = get($dct, sym, [:nothing])
7+
$appl{sym}(::Formatted{DataFormat{sym}}) = get($dct, sym, [:FileIO]) # if no loader is declared, fallback to FileIO
88
function $fchk(pkg::Symbol)
9-
pkg == :nothing && return FileIO #nothing is the symbol for no load/save specific lib. see above
109
!isdefined(Main, pkg) && eval(Main, Expr(:import, pkg))
1110
return Main.(pkg)
1211
end

0 commit comments

Comments
 (0)