python (65.2k questions)
javascript (44.3k questions)
reactjs (22.7k questions)
java (20.8k questions)
c# (17.4k questions)
html (16.3k questions)
r (13.7k questions)
android (13k questions)
How to solve "Returns a value referencing data owned by the current function" (Actual depenecies between structs)
I'm learning Rust (I'm a C++ dev) and I'm still getting used to the borrow checker.
I have the following example (which is also on godbolt: https://godbolt.org/z/z873x9cPn):
struct Foo {
value: i3...
Pau6b
Votes: 0
Answers: 1
How can I pass a value and a reference to it into a struct
I've been recently learning Rust while trying to make a Synthesia-like app (similar to a piano roll). While separating some of the code into its own module, I got into trouble trying to write a "...
Valazo
Votes: 0
Answers: 0
Services in new scope act like transient services
I have a method where I need a new scope (must be a new scope, the scenario here doesn't need it, but when this works I'll use the logic elsewhere where it needs to be a separate scope), for this I us...
J Flex
Votes: 0
Answers: 1