I'm still a beginner in Rust and I'm pretty confused with the use of extern crate. I've read that since Rust 2018 extern crate is not needed in most cases, but some project such as dotenv still use it in their examples:
extern crate dotenv;
use dotenv::dotenv;
use std::env;
When is extern crate required ? In which cases it must be used ?