It is quite a common problem to create a crate that may run into an issue known as double name scope. Consider the following example:
mathslib::conversions::temperature::temperature
Writing the preceding line instead of the following line causes a major problem:
mathslib::conversions::temperature;
The problem is down to the mod.rs and the temperature file.
If you look at lib.rs, it has in it the name of the module that has to marry up with the name of the directory, which, in turn, contains the mod.rs file. The mod.rs file (as we have seen) needs to contain a public interface to the module. Now, following this logic, the code in the temperature.rs file should also have pub mod temperature { ... }. It is this final pub mod that gives the double name scope.
To avoid this problem, just leave the pub mod temperature line out. As long as the filename...