mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-04 04:08:19 +00:00
1.65 changes and clippy fixes
This commit is contained in:
parent
8f62eeaf7e
commit
a97c53d7ca
17 changed files with 37 additions and 19 deletions
|
@ -441,9 +441,9 @@ mod test_snapshots {
|
|||
fn compare_snapshots(result_path: &Path, actual_result: Option<&str>) {
|
||||
if std::env::var("ROC_SNAPSHOT_TEST_OVERWRITE").is_ok() {
|
||||
if let Some(actual_result) = actual_result {
|
||||
std::fs::write(&result_path, actual_result).unwrap();
|
||||
std::fs::write(result_path, actual_result).unwrap();
|
||||
} else {
|
||||
std::fs::remove_file(&result_path)
|
||||
std::fs::remove_file(result_path)
|
||||
.or_else(|e| {
|
||||
if e.kind() == std::io::ErrorKind::NotFound {
|
||||
Ok(())
|
||||
|
@ -454,7 +454,7 @@ mod test_snapshots {
|
|||
.unwrap();
|
||||
}
|
||||
} else if let Some(actual_result) = actual_result {
|
||||
let expected_result = std::fs::read_to_string(&result_path).unwrap_or_else(|e| {
|
||||
let expected_result = std::fs::read_to_string(result_path).unwrap_or_else(|e| {
|
||||
panic!(
|
||||
"Error opening test output file {}:\n\
|
||||
{:?}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue