We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d0f9a0b commit c4adec3Copy full SHA for c4adec3
1 file changed
rust/ql/test/query-tests/unusedentities/unreachable.rs
@@ -1,13 +1,13 @@
1
pub fn cond() -> bool {
2
- true
+ get_a_number() == 1
3
}
4
5
fn get_a_number() -> i32 {
6
- 42
+ maybe_get_a_number().unwrap_or(0)
7
8
9
fn maybe_get_a_number() -> Option<i32> {
10
- None
+ std::env::args().nth(1).map(|s| s.parse::<i32>().unwrap())
11
12
13
// --- unreachable code --
0 commit comments