I have a struct “Number” with i32 value.
There might be a need to transform it into something else (here: into a String).
I tried to use lazyness and caching but I stuck about lifetime problems.
There are two versions of the function I needed (to_str1 and to_str2). None of them can’t compile.
I already read the docs about “borrowing/lifetimes/ownership”. I used to get and fix this kind of problems (in other simple programs). But these defeated me.
Any advise is welcome.