File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -651,14 +651,16 @@ impl LanguageServerHandling for MinecraftShaderLanguageServer {
651651 log_level : String ,
652652 }
653653
654- let config: Configuration = from_value ( params. settings . as_object ( ) . unwrap ( ) . get ( "mcglsl" ) . unwrap ( ) . to_owned ( ) ) . unwrap ( ) ;
654+ if let Some ( settings) = params. settings . as_object ( ) . unwrap ( ) . get ( "mcglsl" ) {
655+ let config: Configuration = from_value ( settings. to_owned ( ) ) . unwrap ( ) ;
655656
656- info ! ( "got updated configuration" ; "config" => params. settings. as_object( ) . unwrap( ) . get( "mcglsl" ) . unwrap( ) . to_string( ) ) ;
657+ info ! ( "got updated configuration" ; "config" => params. settings. as_object( ) . unwrap( ) . get( "mcglsl" ) . unwrap( ) . to_string( ) ) ;
657658
658- configuration:: handle_log_level_change ( config. log_level , |level| {
659- self . log_guard = None ; // set to None so Drop is invoked
660- self . log_guard = Some ( logging:: set_logger_with_level ( level) ) ;
661- } )
659+ configuration:: handle_log_level_change ( config. log_level , |level| {
660+ self . log_guard = None ; // set to None so Drop is invoked
661+ self . log_guard = Some ( logging:: set_logger_with_level ( level) ) ;
662+ } )
663+ }
662664 } ) ;
663665 }
664666
You can’t perform that action at this time.
0 commit comments