server: Limit the scope of a mutable variable
This commit is contained in:
parent
4fb60f251a
commit
73b9fbf612
|
@ -44,8 +44,11 @@ struct SharedData<'a> {
|
|||
|
||||
#[actix_web::main]
|
||||
async fn main() -> std::io::Result<()> {
|
||||
let mut config = Config::parse();
|
||||
config.template_directory = config.template_directory.canonicalize()?;
|
||||
let config = {
|
||||
let mut config = Config::parse();
|
||||
config.template_directory = config.template_directory.canonicalize()?;
|
||||
config
|
||||
};
|
||||
|
||||
env_logger::Builder::new()
|
||||
.filter_level(if config.dev_mode {
|
||||
|
|
Loading…
Reference in a new issue