npub1dv…7ttxk on Nostr: #Rust 1.75 now has impl Trait in return position in traits! If I'm not wrong - am I ...
#Rust 1.75 now has impl Trait in return position in traits!
If I'm not wrong - am I wrong? - that means now it's possible to write #functors in an easy way.
And finally clean #generators :
impl Array2d for MyImage {
fn iter_pixels() -> impl Iterator {
self.0.iter().map(...)
}
}
Published at
2023-12-22 12:07:18Event JSON
{
"id": "f3e1194be6f01eca16bbb3ef5f92567a2d5d0c218d4e433c68059eef89df99ab",
"pubkey": "6b21c06c57aca12c8db0107e061b68c1be74bb969cfcd6fb5b2f8fc02bb82ace",
"created_at": 1703246838,
"kind": 1,
"tags": [
[
"t",
"rust"
],
[
"t",
"functors"
],
[
"t",
"generators"
],
[
"proxy",
"https://fosstodon.org/users/dcz/statuses/111623984828414536",
"activitypub"
]
],
"content": "#Rust 1.75 now has impl Trait in return position in traits!\n\nIf I'm not wrong - am I wrong? - that means now it's possible to write #functors in an easy way.\n\nAnd finally clean #generators :\n\nimpl Array2d for MyImage {\n fn iter_pixels() -\u003e impl Iterator {\n self.0.iter().map(...)\n }\n}",
"sig": "f9f55900a3ea14e54ba8b7cea2c7e22e1f65ac5c7044af5be52ee9910b9a3f5225bbf67a9a12e7e14f8532da11a634fa2c781a343d6a5bb9c3054506a083b6d1"
}