Not really - you can mess around with `Option` but I would not recommend it: https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=60ab707e4b52fbbbabb9787d3af6ddc7 …
Rust friends! (*ahem @fasterthanlime ahem*)
I'm moving `elements` into a new `Partition` struct, and want that struct to have a different field taking a reference to (the now moved) `elements`. Is this possible?
@rustlangpic.twitter.com/dmRbcEJxmq
-
-
-
If you want `Partition` to hold the data, I'd suggest having a method to retrieve the slice you want: https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=4ce2eff36922841eb3fa172698891009 … This way it's only borrowed when you actually need it.
- Još 11 drugih odgovora
Novi razgovor -
Čini se da učitavanje traje već neko vrijeme.
Twitter je možda preopterećen ili ima kratkotrajnih poteškoća u radu. Pokušajte ponovno ili potražite dodatne informacije u odjeljku Status Twittera.