@@ -6,8 +6,8 @@ use std::path::{Path, PathBuf};
66use std:: sync:: OnceLock ;
77
88use super :: schema:: {
9- append_comment, find_section , ConfigDiagnostic , ConfigSection , DiagnosticLevel , LoadedSection ,
10- SectionDescriptor , SectionRef , CONFIG_SECTIONS ,
9+ append_comment, find_section_for , ConfigDiagnostic , ConfigSection , DiagnosticLevel ,
10+ LoadedSection , SectionDescriptor , SectionRef , CONFIG_SECTIONS ,
1111} ;
1212use super :: validation:: { validate_document, validate_registry, warn_unknown_sections} ;
1313
@@ -146,7 +146,7 @@ impl Config {
146146 let mut sections = HashMap :: new ( ) ;
147147 for descriptor in & descriptors {
148148 let table = ( !descriptor. builtin ( ) )
149- . then ( || find_section ( root, descriptor. name ) )
149+ . then ( || find_section_for ( root, descriptor) )
150150 . flatten ( ) ;
151151 let loaded = ( descriptor. parse ) ( table, & mut diagnostics) ;
152152 sections. insert ( ( descriptor. type_id ) ( ) , loaded) ;
@@ -160,7 +160,7 @@ impl Config {
160160 && value. is_table ( )
161161 && !descriptors
162162 . iter ( )
163- . any ( |descriptor| applechu_schema :: keys_equal ( descriptor. name , name) )
163+ . any ( |descriptor| descriptor. matches_name ( name) )
164164 } )
165165 . filter_map ( |( name, value) | value. as_table ( ) . map ( |table| ( name. clone ( ) , table. clone ( ) ) ) )
166166 . collect ( ) ;
0 commit comments