async fn try_files(files: &[&str]) -> Option<Self> {
        // convert all files into PathBufs
        let files: Vec<PathBuf> = files.iter().map(|&f| PathBuf::from(f)).collect();

        for path in &files {
            match Self::read_and_parse_file(path).await {
                Ok(res) => return Some(res),
                Err(e) => log::warn!("{} (for file {:?})", e, path),
            }
        }
        None
    }
/// Opens files in order and tries to successfully parse them into an [AppConfig](Self). If
/// unsuccessful, it will continue onto the next file until it runs out of options.
///
/// Determines the parse algorithm based on the extension of the file path, i.e. `*.yaml` will
/// result in yaml parsing and `*.json` will result in json parsing.
Opens files in order and tries to successfully parse them into an [AppConfig](Self). If
unsuccessful, it will continue onto the next file until it runs out of options.

Determines the parse algorithm based on the extension of the file path, i.e. `*.yaml` will
result in yaml parsing and `*.json` will result in json parsing.
Opens files in order and tries to successfully parse them into an [ AppConfig ] ( Self ) . If unsuccessful it will continue onto the next file until it runs out of options . Determines the parse algorithm based on the extension of the file path i . e . ` * . yaml ` will result in yaml parsing and ` * . json ` will result in json parsing .
async fn try_files(files: &[&str]) -> Option<Self> {
        // convert all files into PathBufs
        let files: Vec<PathBuf> = files.iter().map(|&f| PathBuf::from(f)).collect();
        for path in &files {
            match Self::read_and_parse_file(path).await {
                Ok(res) => return Some(res),
                Err(e) => log::warn!("{} (for file {:?})", e, path),
            }
        }
        None
    }
async fn try_files ( files : & [ & str ] ) -> Option < Self > { // convert all files into PathBufs let files : Vec < PathBuf > = files . iter ( ) . map ( | & f | PathBuf :: from ( f ) ) . collect ( ) ; for path in & files { match Self :: read_and_parse_file ( path ) . await { Ok ( res ) => return Some ( res ) , Err ( e ) => log :: warn ! ( " " e path ) , } } None }
Opens files in order and tries to successfully parse them into an [AppConfig](Self).
Opens files in order and tries to successfully parse them into an [ AppConfig ] ( Self ) .
files
&[&str]