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.
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.
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.
Those are not VPS specs, that is more the kind where you would get a dedicated hardware server at a hoster. Hosting your own becomes much more viable the larger your operation becomes.
IPv6 binds on wildcard addresses include binding to the IPv4 addresses.
What does ss -tlnp
return? Does the process listen on any ports?
That should only affect ports below 1024.
Your two bind addresses might be in conflict with each other since [::]:5234
includes binding to the first one.
Which is why I said “on price”. Obviously that is only one of the factors but don’t kid yourself into thinking that your local server will ever be cheaper. It might have many other advantages but price just won’t be one of them.
Electricity isn’t free and nor is your time, you are never going to beat commercial VPS hosters on price.
Or, you know, not that crazy after all if germ can survive that process.
While it might be reasonable to expect a web page to behave the way you describe, for anything more in web application territory the expectation that everything you ever loaded will stay visible somehow and available without cooperation of the code implementing the website is ridiculous.
Python packaging and stability is a total mess. It has gotten to the point where I just look for alternative tools when I find out something new I found is written in Python.
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.