according to https://stackoverflow.com/a/26435155/5884503, mod something
searches for something.rs
.
Here's what I'm trying to do based on that:
main.rs
message_socket.rs
mod.rs
body.rs
mod.rs:
mod message_socket;
mod body;
body.rs:
struct Body{}
message_socket.rs:
mod body;
error:
error[E0583]: file not found for module `body`
--> src/message_socket.rs:7:1
|
7 | mod body;
| ^^^^^^^^^
|
= help: to create the module `body`, create file "src/message_socket/body.rs"
It's trying to look inside message_socket
which is a file, not a directory.
Why?