Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions rust/extractor/src/qltest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ path = "main.rs"
fn set_sources(config: &mut Config) -> anyhow::Result<()> {
let path_iterator = glob("**/*.rs").context("globbing test sources")?;
config.inputs = path_iterator
.filter(|f| f.is_err() || !f.as_ref().unwrap().starts_with("target"))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess your intention is to keep Err paths, right? So any errors are not silently ignored. If you just want to drop Err paths then it might be nicer to use f.is_ok_and() instead of the is_err check and unwrapping.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, I hesitated between the two, but in the end opted for not suppressing the errors for now

.collect::<Result<Vec<_>, _>>()
.context("fetching test sources")?;
Ok(())
Expand Down