I do run into them even though I use Rust for ~3 years now, but only in non-obvious cases, e. g. when all references to the borrowed data are dropped before the end of the function.
Auch bekannt als:
- 16 Posts
- 426 Comments
Rust would be some borrow checker compile error like
borrowed data escapes outside of associated function
argument requires that `'1` must outlive `'static`
d_k_bo@feddit.orgto Programmer Humor@programming.dev•Python needs an actual default function7·2 months agoFree standing functions in Java?! This can’t be true.
d_k_bo@feddit.orgto Programmer Humor@programming.dev•Python needs an actual default function385·2 months agoStill better than having to create a new class just to implement
public static void main(String[] args) {}
Relevant Fireship video: https://youtu.be/m4-HM_sCvtQ
Duplicate of https://lemmy.world/post/30140736
d_k_bo@feddit.orgto Rust@programming.dev•Flattening Rust's Learning Curve | corrode Rust Consulting3·2 months agoTIL about
clippy::cargo
. Thanks!
d_k_bo@feddit.orgto Gnome@discuss.tchncs.de•An accessibility update – GTK Development BlogEnglish1·2 months agoThe new tool just got ported to rust, so its cool.
Rustaceans in a nutshell 🦀
d_k_bo@feddit.orgto Kaufempfehlungen - gute, haltbare Produkte, die man kennen sollte@feddit.org•❓Gesucht: Kleine Thermoskanne für Kaffee2·2 months agoIch war bisher mit den Thermoskannen von Primus sehr zufireden, meistens war der Tee auch noch nach 12 h warm. Ich weiß aber nicht, wie das bei den kleineren Modellen ist, die grundsätzlich schlechter Wärme halten können, weil Physik.
I recommend using numbered footnotes (
¹
,²
etc.) or escaping the asterisk (\*
) instead of using plain asterisks for footnotes, because the asterisk is also used in Markdown for emphasis and list items.
See also https://lemmy.ca/post/40253303
Glückwunsch, ABER…
…hättest du zufallig einen Alt-Text im Angebot? Bin beim Versuch, das zu lesen, spontan erblindet.
weint in 59 min Verspätung¹
¹ Mir wurde tatsächlich mal eine Teilerstattung gewährt, als der Zug laut Bahn 59 min Verspätung hatte und ich das Fahrgastrechteformular trotzdem ausgefüllt hatte nach dem Motto „auf meiner Uhr waren das 61 min“.
Das sieht hier auf Lassmich glaube ich nur so aus, weil Pfosten, die keiner Kommune zugeordnet sind, nicht angezeigt werden. Auf https://mastodon.social/@MrLovenstein/114343787735628933 siehst du, dass das Konto weiterhin aktiv ist.
Da musst du glaube ich @[email protected] fragen. Ich habe das nur geklaut und „feddit.de“ durch „feddit.org“ ersetzt.
this
is commonly used with a similar meaning toself
in cases whereself
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