mirror of
https://github.com/roc-lang/roc.git
synced 2024-11-09 12:16:43 +03:00
shorten file lifetime, maybe that helps?
This commit is contained in:
parent
dad0336d71
commit
da6a6dcf1c
@ -1931,12 +1931,14 @@ pub fn surgery(
|
||||
) {
|
||||
let total_start = SystemTime::now();
|
||||
let loading_metadata_start = total_start;
|
||||
let input = fs::File::open(metadata_filename).unwrap_or_else(|e| internal_error!("{}", e));
|
||||
let input = BufReader::new(input);
|
||||
let md: metadata::Metadata = match deserialize_from(input) {
|
||||
Ok(data) => data,
|
||||
Err(err) => {
|
||||
internal_error!("Failed to deserialize metadata: {}", err);
|
||||
let md: metadata::Metadata = {
|
||||
let input = fs::File::open(metadata_filename).unwrap_or_else(|e| internal_error!("{}", e));
|
||||
let input = BufReader::new(input);
|
||||
match deserialize_from(input) {
|
||||
Ok(data) => data,
|
||||
Err(err) => {
|
||||
internal_error!("Failed to deserialize metadata: {}", err);
|
||||
}
|
||||
}
|
||||
};
|
||||
let loading_metadata_duration = loading_metadata_start.elapsed().unwrap();
|
||||
|
Loading…
Reference in New Issue
Block a user