fn process_single_file(
    opts: &Opts,
    filepath: PathBuf,
    content: Vec<u8>,
) -> anyhow::Result<Profile> {
    match std::panic::catch_unwind(|| process_single_file_with_retry(opts, filepath, content)) {
        Ok(r) => r,
        Err(panic) => match panic.downcast::<String>() {
            Ok(msg) => Err(anyhow!("panic: {}", msg)),
            Err(_) => Err(anyhow!("panic: unknown")),
        },
    }
}
// Parse and typecheck a single file, given the command-line options and the file's contents
Parse and typecheck a single file, given the command-line options and the file's contents
Parse and typecheck a single file given the command - line options and the file ' s contents
fn process_single_file(
    opts: &Opts,
    filepath: PathBuf,
    content: Vec<u8>,
) -> anyhow::Result<Profile> {
    match std::panic::catch_unwind(|| process_single_file_with_retry(opts, filepath, content)) {
        Ok(r) => r,
        Err(panic) => match panic.downcast::<String>() {
            Ok(msg) => Err(anyhow!("panic: {}", msg)),
            Err(_) => Err(anyhow!("panic: unknown")),
        },
    }
}
fn process_single_file ( opts : & Opts , filepath : PathBuf , content : Vec < u8 > , ) -> anyhow :: Result < Profile > { match std :: panic :: catch_unwind ( | | process_single_file_with_retry ( opts , filepath , content ) ) { Ok ( r ) => r , Err ( panic ) => match panic . downcast :: < String > ( ) { Ok ( msg ) => Err ( anyhow ! ( " " msg ) ) , Err ( _ ) => Err ( anyhow ! ( " " ) ) , } , } }
Parse and typecheck a single file, given the command-line options and the file's contents
Parse and typecheck a single file given the command - line options and the file ' s contents
opts
&Opts
filepath
PathBuf
content
Vec<u8>