What are the most common mistakes and code-smells that newbies make?
I have previously worked with Go and Python, etc. Rust is completely new to me. For now my priority is just to get a very basic application to even work.
I'm writing a fairly basic web application using Actix Web, and taking lots of help from ahem, AI (sorry!). I'm basically following the same patterns (configure routes, write handlers, etc.) as I did when I was working with web frameworks in Python. So far everything's working like I'd expect, and I'm kind of amazed it hasn't ever crashed. If I had worked with C/C++ with my half-baked knowledge then I would've needed to get past so many crashes just to even get even a portion of it to work, so this is very promising and incredibly satisfying to see my program work on my very first attempt and I feeling very enthusiastic about attempting to write a slightly more complex application (Reactive frontend with WebSocket, nicely integrated together with my Rust backend).
I'm not so sure about how to organize code, but so far I have a main.rs for the main launcher and cli arguments, server.rs for the http listener, a routes.rs that configures the http endpoints, web.rs that contains the handlers for these routes. It looks kind of right to me but I'm too new to all this to have some intuition about code-smells. For example, I have a web.rs but I am not sure if that filename is okay or I'll end up confusing functions in that with what is already there in actix-web.
More abstractly, I was wondering what are some common mistakes, pitfalls, anti-patterns, code-smells, etc. that someone like me at this early stage should watch out for? How do I even know whether what I'm writing is idiomatic style, or do I just need to wait until I reach that stage? What do I need to do to avoid learning hard-to-break bad habits as I experiment with rust?