So there is this example of borrowing -> https://doc.rust-lang.org/beta/rust-by-example/scope/borrow.html
fn borrow_i32(borrowed_i32: &i32) is getting called with a
&Box<i32> I guess the Borrow trait is responsible for turning the
&Box<i32> into and
&i32. If it is how does the compiler know that it has to use the method from this trait or from some other in case it's a different trait? I just have a hard time figuring out how these things work in Rust.
I guess the Borrow trait is responsible
Also, procedural aside: there's no problem with asking these types of questions here, but it's not the primary place for them, either. That's why responses are so slow. Regular "using Rust" questions are more frequent in the Discord or user's forum (https://www.rust-lang.org/community). Zulip tends to be more heavily used by the people working on compiler and other "implementation details"
So if you want responses any quicker, those might be better places :-)
Ah ok, I keep that in mind. Also thanks for the link.