File tree Expand file tree Collapse file tree 2 files changed +9
-7
lines changed
src/packs/parsing/ruby/zeitwerk Expand file tree Collapse file tree 2 files changed +9
-7
lines changed Original file line number Diff line number Diff line change 22
33[package ]
44name = " pks"
5- version = " 0.2.18 "
5+ version = " 0.2.19 "
66edition = " 2021"
77description = " Welcome! Please see https://github.com/rubyatscale/pks for more information!"
88license = " MIT"
Original file line number Diff line number Diff line change @@ -186,14 +186,16 @@ struct ConstantResolverCache {
186186fn get_constant_resolver_cache ( cache_dir : & Path ) -> ConstantResolverCache {
187187 let path = cache_dir. join ( "constant_resolver.json" ) ;
188188 if path. exists ( ) {
189- let file = std:: fs:: File :: open ( path) . unwrap ( ) ;
190- let reader = std:: io:: BufReader :: new ( file) ;
191- serde_json:: from_reader ( reader) . unwrap ( )
192- } else {
193- ConstantResolverCache {
194- file_definition_map : HashMap :: new ( ) ,
189+ if let Ok ( file) = std:: fs:: File :: open ( path) {
190+ let reader = std:: io:: BufReader :: new ( file) ;
191+ if let Ok ( cache) = serde_json:: from_reader ( reader) {
192+ cache
193+ }
195194 }
196195 }
196+ ConstantResolverCache {
197+ file_definition_map : HashMap :: new ( ) ,
198+ }
197199}
198200
199201fn cache_constant_definitions (
You can’t perform that action at this time.
0 commit comments