Mo :ferris: :tux: @ FOSDEM on Nostr: Did you know that you can break with a value from a labeled block in #Rust? 'outer is ...
Did you know that you can break with a value from a labeled block in #Rust?
'outer is not a lifetime here, it is a block label.
This in particular is not very useful, but in the second example, you see how it can be useful to break from an outer loop.
#RustLang
Published at
2023-08-28 23:57:37Event JSON
{
"id": "19d641bf2e271c0780c5eea23fb639c5f0468776e1a28acedfcac44c4da9b8ba",
"pubkey": "979383f8767c5d795fcad86f82dc7b38b384c1a473710c433014dc2c0fb0e359",
"created_at": 1693267057,
"kind": 1,
"tags": [
[
"t",
"rust"
],
[
"t",
"rustlang"
],
[
"proxy",
"https://fosstodon.org/users/mo8it/statuses/110969949871759163",
"activitypub"
]
],
"content": "Did you know that you can break with a value from a labeled block in #Rust?\n\n'outer is not a lifetime here, it is a block label.\n\nThis in particular is not very useful, but in the second example, you see how it can be useful to break from an outer loop.\n\n#RustLang\n\nhttps://cdn.fosstodon.org/media_attachments/files/110/969/930/490/149/710/original/ac103152c7f229e3.png\n\nhttps://cdn.fosstodon.org/media_attachments/files/110/969/942/459/676/217/original/f069dc07e70b9b47.png",
"sig": "606597468bac0df6f7c2dfa372e5a4241db7e5c3942a1d6bf7c3ec38bd246e5fd65cb766b0f56801e32e79de6d87e892629a337e5932e24b796a26d4cebde03f"
}