updated error messages

This commit is contained in:
Trevor Settles 2024-02-08 15:25:15 -07:00
parent 4b4ad47312
commit 5f6d259e5d
No known key found for this signature in database
GPG key ID: F46B83058222DBAA
3 changed files with 28 additions and 24 deletions

View file

@ -3841,8 +3841,7 @@ struct HeaderOutput<'a> {
fn ensure_roc_file<'a>(filename: &PathBuf, src_bytes: &[u8]) -> Result<(), LoadingProblem<'a>> {
match filename.extension() {
Some(ext) => {
let roc_ext = std::ffi::OsStr::new("roc");
if roc_ext != ext {
if ext != ROC_FILE_EXTENSION {
return Err(LoadingProblem::FileProblem {
filename: filename.clone(),
error: io::ErrorKind::Unsupported,