I have taken the input from user but when i am trying to compare, it does not enter the if or else if block . Instead, it goes to else block
use std::io;
fn main() {
let small_coffee = 2;
let medium_coffee = 4;
let large_coffee = 6;
let mut total_price = 0;
let mut user_choice = String::new();
io::stdin().read_line(&mut user_choice).ok().expect("Eror");
if user_choice == "1" {
total_price += small_coffee;
} else if user_choice == "2" {
total_price += medium_coffee;
} else if user_choice == "3" {
total_price += large_coffee;
} else {
println!("Sorry! Invalid Choice");
}
println!("Your total bill amounted to : {}$", total_price);
}