-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove a #[allow(clippy::match_wild_err_arm)]
and dedup error message creation
#46
Conversation
rinja_derive/src/config.rs
Outdated
Ok(source) | ||
} else { | ||
let msg = format!( | ||
"unable to open template file '{}'", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should provide the Err()
value in the error message, it's not always obvious what's wrong (like wrong rights).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good call! Added.
6abf376
to
ddd4a81
Compare
@@ -0,0 +1,10 @@ | |||
error: unable to open template file '$WORKSPACE/target/tests/trybuild/rinja_testing/templates/a_file_that_is_actually_a_folder.html': | |||
Is a directory (os error 21) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hum... I think having the error text on the same line might be better. What do you think?
PS: Having a test for this is great, thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wasn't sure if the line does not become too long, then. But chances are that you aren't using such a long path in a real project. :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Boarf, I think it's fine. I find it less confusing this way.
ddd4a81
to
6a69946
Compare
Thanks! |
No description provided.