fn main() {<br></br> // Declare a variable binding<br></br> let a_binding;<br></br><br></br> {<br></br> let x = 2;<br></br><br></br> // Initialize the binding<br></br> a_binding = x * x;<br></br> }<br></br><br></br> println!("a binding: {}", a_binding);<br></br><br></br> let another_binding;<br></br><br></br> // Error! Use of uninitialized binding<br></br> println!("another binding: {}", another_binding);<br></br> // FIXME ^ Comment out this line<br></br><br></br> another_binding = 1;<br></br><br></br> println!("another binding: {}", another_binding);<br></br>}<br></br>
@mizah Pretty sure this is a pre-Rust 1.0 thing. You can even initialize the binding in all branches of a match / if-else and use it afterwards.
Also: you can initialize a binding only in one branch, the value can be used only in that branch, but will be dropped at the enclosing scope of the let.
@mizah Given how many excellent tech posts I regularly see coming (tag-subscriptions are really helpful) from lgbtqia+, fur, hornyonmain, poly, and lewd (and a whole slew of other things I just forgot to mention) instances and accounts, I'd say: Go for it =^_^=
Hey #Nixos people, I'm trying to run #prosody but it's having an issue with the TLS certificates.
I see that the key.pem file is owned by acme nginx, and it's set to group-readable. (Yes, I'm running nginx as well on this server and would like to keep it.)
Obviously, Prosody can't read that file... What's the "right" way to do that? Set Prosody's group to nginx? Or set up an extra group? Or...?
@mizah@mattcarrier Also worth noting: As a rule of thumb I always reboot after Steam updates itself. I have found there's a very good chance of games not launching properly in the same session as an update.
Hey #opensource people, got anything fun that you could have some extra help with?
I'm kinda coding solo a lot of the time and I wanna learn how to function more in a cooperative environment, but I dunno where to start and the larger projects are a bit intimidating.
I can do "for leaning purposes", learning is exactly what I'm trying to do.
Building on top of Matrix? Do you mean it'll be interoperable, or use the same protocols?
I gotta say I'm not terribly thrilled with Matrix as a protocol; especially their idea of E2E encryption is a bit... meh, IMHO, since it pertains only to the message body (metadata and emoji reactions are in plaintext) and it's honestly way too technical for average users, though the latter should be fixable implementation-side since it's mainly a UX problem.