
Promise.all still relevant in 2025?In 2025, async JavaScript looks very different. With tools like Promise.any, Promise.allSettled, and Array.fromAsync, many developers wonder if Promise.all is still worth it. The short answer is yes — but only if you know when and why to use it.

Discover what’s new in The Replay, LogRocket’s newsletter for dev and engineering leaders, in the October 29th issue.

Learn about the new features in the Next.js 16 release: why they matter, how they impact your workflow, and how to start using them.

Test out Meta’s AI model, Llama, on a real CRUD frontend projects, compare it with competing models, and walk through the setup process.
Would you be interested in joining LogRocket's developer community?
Join LogRocket’s Content Advisory Board. You’ll help inform the type of content we create and get access to exclusive meetups, social accreditation, and swag.
Sign up now
One Reply to "A deep dive into Rust iterators and closures"
Is logrocket a content farm? It increasingly pops up when searching for Rust stuff, but it seems to be mostly basic material with links to other texts on the same site.
The click-bait title of this article is misleading. This is not a deep dive, at best it is a superficial introduction. It also contains errors.
1. Closures does not “create a reference to the entities in its scope”, this doesn’t compile:
“`
fn main() {
let foo: String = String::from(“hello”);
let c = |x| {
let y: &String = x;
println!(“{}”, y);
};
c(foo);
}
“`
2. It’s not true that one “cannot iterate through a set of values (arrays, vectors, maps) in Rust using loops”:
“`
fn main() {
let vec = vec![1, 2, 3];
for i in 0..3 {
println!(“{:?}”, vec.get(i));
}
}
“`