()
| 40 | } |
| 41 | |
| 42 | fn main() { |
| 43 | let nums = [1,3,8,10,15,32,44,48,50,55,60,62,64]; |
| 44 | |
| 45 | let mut target = 3; |
| 46 | let found = binary_search1(&nums, target); |
| 47 | println!("nums contains {target}: {found}"); |
| 48 | |
| 49 | target = 63; |
| 50 | let found = binary_search1(&nums, target); |
| 51 | println!("nums contains {target}: {found}"); |
| 52 | |
| 53 | target = 3; |
| 54 | let found = binary_search2(&nums, target); |
| 55 | println!("nums contains {target}: {found}"); |
| 56 | |
| 57 | target = 63; |
| 58 | let found = binary_search2(&nums, target); |
| 59 | println!("nums contains {target}: {found}"); |
| 60 | } |
nothing calls this directly
no test coverage detected