You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
pubfnget_url<U: std::fmt::Display>(url:U,query:Option<&str>) -> String{letmut result = url.to_string();ifletSome(query) = query {
result += &format!("?{}", query);// <== THIS ONE}
result
}
The fact that the get_url function is generic has something to do with this, but it's strange. If I change it to this:
pubfnget_url(url:&str,query:Option<&str>) -> String{letmut result = url.to_string();ifletSome(query) = query {
result += &format!("?{}", query);}
result
}
Describe the bug
OS: macOS Sonoma 14.2.1
Engine: llvm
It looks like when using
tarpaulin
with Rust 1.75.0, there are erroneous missing line coverage in the report.To Reproduce
Minimal reproducible project (generated using
cargo new foo --lib
):lib.rs
tarpaulin.toml
When running
cargo +1.75.0 tarpaulin
:When running
cargo +1.74.1 tarpaulin
:The missing line in 1.75.0:
The fact that the
get_url
function is generic has something to do with this, but it's strange. If I change it to this:And rerun
cargo +1.75.0 tarpaulin
:In this case, the line that was earlier considered uncovered is no longer considered at all.
An example of this in my project: https://app.codecov.io/gh/clechasseur/mini_exercism/commit/9f1d454fc3d0a22c841fbffaa80ddf6c61b8be49
Expected behavior
Lines should be considered covered, just like when using Rust 1.74.1.
The text was updated successfully, but these errors were encountered: