@[email protected] to Programmer [email protected] • 12 days agoThe meaning of thislemmy.worldimagemessage-square13fedilinkarrow-up1286cross-posted to: [email protected]
arrow-up1286imageThe meaning of thislemmy.world@[email protected] to Programmer [email protected] • 12 days agomessage-square13fedilinkcross-posted to: [email protected]
minus-square@[email protected]linkfedilink6•12 days agothis is commonly used with a similar meaning to self in cases where ` self can’t be used because it is a reserved keyword. Example: fn poll_next(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Option<St1::Item>> { let this = self.project(); this.inner.poll_next(cx) } https://github.com/rust-lang/futures-rs/blob/master/futures-util/src/stream/select.rs#L113-L116
Rust: do you mean Self or self?
this
is commonly used with a similar meaning toself
in cases where ` self can’t be used because it is a reserved keyword.Example:
https://github.com/rust-lang/futures-rs/blob/master/futures-util/src/stream/select.rs#L113-L116