Me, every time I try searching a Rust question.
That’s easy. Just do:
fn is_second_num_positive() -> bool {
let input = "123,-45";
let is_positive =
input.split(',')
.collect::<Vec<&str>>()
.last()
.unwrap()
.parse::<i32>()
.unwrap()
.is_positive();
is_positive
}



That always makes it a bit worse. When I see ignorant comments on other sites, I usually tell myself it might be made by an edgy teenager. Can’t do that on Lemmy. That’s a grown adult praising North Korea…