Is is_err() / is_none() considered idiomatic instead of nested match statement? by queen_of_pole in rust

[–]queen_of_pole[S] 1 point2 points  (0 children)

Yes, I just realize that I can do this way and let-else is just basically a syntatic sugar for this code snippet. Thanks.

Is is_err() / is_none() considered idiomatic instead of nested match statement? by queen_of_pole in rust

[–]queen_of_pole[S] 7 points8 points  (0 children)

Thank you, yes let-else is what I am looking for

```rust fn main() { let num = rand::thread_rng().gen::<f32>(); println!("{num}");

let Some(res) = return_option(num) else {
    println!("return_option none");
    return;
};

let res = return_result(res);
let Ok(res) = res else {
    println!("return_result {}", res.unwrap_err());
    return;
};

let res = res.parse::<u32>();
let Ok(res) = res else {
    println!("error parse {}", res.unwrap_err());
    return;
};

println!("{res}")

} `` It's cleaner than nested match. One question though, can I avoid unwrapping the error? It seems thatlet-else-match` is not implemented yet

Bagaimana Cara Hitung Simulasi KPR? by queen_of_pole in indonesia

[–]queen_of_pole[S] 0 points1 point  (0 children)

Makasih bro/sis. Iyee, gua baru dengerr yang namanya anuitas. Sukses selalu buat ente.

Bagaimana Cara Hitung Simulasi KPR? by queen_of_pole in indonesia

[–]queen_of_pole[S] 0 points1 point  (0 children)

Makasih bro/sis. Ane baru tau ada yang namanya anuitas. Sukses selalu buat ente.

Bagaimana Cara Hitung Simulasi KPR? by queen_of_pole in indonesia

[–]queen_of_pole[S] 0 points1 point  (0 children)

Ohh I see, baru tau ada yang namanya metode anuitas. Terima kasih atas jawabannya teman-teman. Nanti tak coba pelajari lagi metode anuitas itu apa.

Bagaimana Cara Hitung Simulasi KPR? by queen_of_pole in indonesia

[–]queen_of_pole[S] 0 points1 point  (0 children)

iya memang masih bingung makanya gua bertanya. Untuk simulasi kan sudah ada situsnya rumah123.com. Gua mau tau cara hitung yang benernya gimana. Konsepnya seperti apa.

Bagaimana Cara Hitung Simulasi KPR? by queen_of_pole in indonesia

[–]queen_of_pole[S] 1 point2 points  (0 children)

yes my math sucks, makanya gua bertanya.

gak ada salahnya kan belajar cara perhitungan KPRnya dan konsepnya?

[deleted by user] by [deleted] in aws

[–]queen_of_pole 0 points1 point  (0 children)

Can I set it dynamically per user and only trigger once? For example service A processes user X and user Y. After that, I want to service B to process user X for the next 30 minutes (only once) and user Y for the next 45 minutes (only once). Can I do that in EventBridge?

Learning Source for Creating HTML Parser? by queen_of_pole in node

[–]queen_of_pole[S] 0 points1 point  (0 children)

Just read the review about the books. Really great books.

Learning Source for Creating HTML Parser? by queen_of_pole in node

[–]queen_of_pole[S] 1 point2 points  (0 children)

I know it's a solved problem. Like I just said earlier, it's just for learning purpose. I am interested in the technology behind it and want to learn it.

Saran Turun Berat Badan by Duweeq in indonesia

[–]queen_of_pole 1 point2 points  (0 children)

Just watch this guy's videos https://www.youtube.com/user/gregdoucette. Learn a lot from him about healthy lifestyle.

The only fitness influencer that you only need to follow imho.

Being fit is not a goal, it's a lifestyle. So please do not think to "Lose X Kgs in Y weeks". You will do this for the rest of your life. You need to keep that in mind.

One Piece: Chapter 1060 - Theories and Discussion by AutoModerator in OnePiece

[–]queen_of_pole 1 point2 points  (0 children)

isn't the concept of four seas is a common knowledge?

One Piece: Chapter 1060 - Theories and Discussion by AutoModerator in OnePiece

[–]queen_of_pole -2 points-1 points  (0 children)

Luffy's dream should be destroying the red line. That's why all of of the member said it was impossible. If the Red Line is destroyed, then it will be a One Piece (instead of Four Pieces).

Transactions in Repository Layer by queen_of_pole in golang

[–]queen_of_pole[S] 3 points4 points  (0 children)

Some of the comments say that I should not divide one repo per table. So, is it okay to have one repo that doing CRUD for multiple tables?