خرید بک لینک

Vote count: -1

I need to match Strings in using Rust lang but I tried and i can't

see my code

for (key, value) in obj.iter() {
    let valueType = match Some(value.to_string()) {
        Some(ref x) if x == "some_value" => string_gen(),
        _ => "test".to_string()
    };
    println!("{}", value);
    println!("{}", valueType);
}

I have to match the word "some_value" when the value of the iterator is "some_value"

Can someone help me? I did a lot of searches and have a lot of people with the same doubts.

asked 1 min ago

برچسب: نویسنده: استخدام کار تاريخ: دوشنبه 17 خرداد 1395 ساعت: 7:37

صفحه بندی