File tree 2 files changed +9
-7
lines changed
src/packs/parsing/ruby/zeitwerk
2 files changed +9
-7
lines changed Original file line number Diff line number Diff line change 2
2
3
3
[package ]
4
4
name = " pks"
5
- version = " 0.2.18 "
5
+ version = " 0.2.19 "
6
6
edition = " 2021"
7
7
description = " Welcome! Please see https://github.com/rubyatscale/pks for more information!"
8
8
license = " MIT"
Original file line number Diff line number Diff line change @@ -186,14 +186,16 @@ struct ConstantResolverCache {
186
186
fn get_constant_resolver_cache ( cache_dir : & Path ) -> ConstantResolverCache {
187
187
let path = cache_dir. join ( "constant_resolver.json" ) ;
188
188
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
+ }
195
194
}
196
195
}
196
+ ConstantResolverCache {
197
+ file_definition_map : HashMap :: new ( ) ,
198
+ }
197
199
}
198
200
199
201
fn cache_constant_definitions (
You can’t perform that action at this time.
0 commit comments