mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-03 03:42:17 +00:00
clippy
This commit is contained in:
parent
3eec1f4bb0
commit
2b64123dbb
1 changed files with 3 additions and 3 deletions
|
@ -3838,12 +3838,12 @@ struct HeaderOutput<'a> {
|
|||
opt_platform_shorthand: Option<&'a str>,
|
||||
}
|
||||
|
||||
fn ensure_roc_file<'a>(filename: &PathBuf, src_bytes: &[u8]) -> Result<(), LoadingProblem<'a>> {
|
||||
fn ensure_roc_file<'a>(filename: &Path, src_bytes: &[u8]) -> Result<(), LoadingProblem<'a>> {
|
||||
match filename.extension() {
|
||||
Some(ext) => {
|
||||
if ext != ROC_FILE_EXTENSION {
|
||||
return Err(LoadingProblem::FileProblem {
|
||||
filename: filename.clone(),
|
||||
filename: filename.to_path_buf(),
|
||||
error: io::ErrorKind::Unsupported,
|
||||
});
|
||||
}
|
||||
|
@ -3857,7 +3857,7 @@ fn ensure_roc_file<'a>(filename: &PathBuf, src_bytes: &[u8]) -> Result<(), Loadi
|
|||
if let Ok(first_line) = String::from_utf8(frist_line_bytes) {
|
||||
if !(first_line.starts_with("#!") && first_line.contains("roc")) {
|
||||
return Err(LoadingProblem::FileProblem {
|
||||
filename: filename.clone(),
|
||||
filename: filename.to_path_buf(),
|
||||
error: std::io::ErrorKind::Unsupported,
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue