

So only indentation, no alignment then?


So only indentation, no alignment then?


On a long enough timeline, neither is Rust probably, but such is the price of innovation.
It is always so weird to me that people literally seem to believe that complex inventions like programming languages are something we got to perfection within 20 (in C’s case) or 30 (in C++'s case) years of the advent of our industry. Especially considering an iteration cycle is somewhere in the decade or longer range for these. I would expect this to improve for at least a couple of hundred years before we reach the point where nothing new can be added to existing programming languages that is worth starting over with a new language to reap the benefits.


I usually use cargo upgrade -i allow --pinned --verbose and that works just fine. What isn’t working for you?


Not sure what you are trying to do but drag&drop UI design is not as popular as it was back in the 90s mainly because modern applications and games often need to run on a variety of window and screen sizes so they need to be more dynamic than the graphical approach to building them can handle both in terms of sizes and aspect ratios and also in terms of omitting and replacing UI elements on smaller screens.
Out of all the languages I have ever worked with upgrading dependencies in Rust is literally the easiest. All the times when that was hard in Rust it was hard for reasons that literally affect all languages such as a library that had become unmaintained or a significant API change to an obscure library. The major libraries implementing common functionality are all very well managed and barely ever have breaking changes.


Kind of but it is also only needed at compile time, the dependencies are not used at runtime, instead everything is compiled and statically linked into the executable.


You should use filter_map instead of the retain and later unwrapping and you don’t need a fold to build a Vec from an iterator, you can just use collect for that at the end.


It is certainly great news that gccrs doesn’t intend to fuck up the Rust ecosystem the way multiple compiler implementations have fucked up other language ecosystems and standards.


Your return will return from the function, not from the for loop as you probably assume. The for loop itself does not return a value.
Only loop based loops can use break to return values, other loops do not.
You also forgot the let keyword in your assignment
I assume you want to return the value of the href attribute for the first node that has one? In that case you want something like
fn get_first_href_value(link_nodes: Select) -> Option<String> {
for node in link_nodes {
if let Some(href_value) = node.value().attr("href") {
return Some(href_value.into());
}
}
None
}
or, more idiomatically
fn get_first_href_value(link_nodes: Select) -> Option<String> {
link_nodes.into_iter().find_map(|node| node.value().attr("href")).map(|v| v.to_string())
}
As with many posts like this one, please include some sort of paragraph on what your software actually does instead of just assuming everyone is familiar with it.


But why not use a proper builder pattern in that case?


But a scope adds a nesting level which adds a lot more visual clutter.


The first one won’t work either for private fields.


Why not just a let app = app; line after the let mut app = ...; one?
In 99% of those cases you would want it to resolve .. components though.


It is pretty shit at remembering search filters in general, e.g. the Linux platform filter or the co-op filter constantly reset for me and have for years.


Most likely it is going to be one of those AAA games too and they are all shit anyway in recent years.


it is not as if used PCs with year old components aren’t cheaper than new ones. The console is significantly worse here because the subscription prices do not get reduced by anything because the hardware is older.


The hated minority being inferior but also immensely powerful is a pretty standard feature of anti-minority world views of all kinds. It is pretty much required to justify the extreme actions they want to take against the minority.
To be fair whoever invented YAML was just a sadist in general who wanted to see everyone in the industry suffer.