fn comic_list() -> Json {
    let mut folders = fs::read_dir(&CONFIG.img_folder)
        .unwrap()
        .filter_map(|el| {
            let info = el.ok()?;
            if info.path().is_dir() {
                Some(info.file_name().to_string_lossy().into_owned())
            } else {
                None
            }
        })
        .collect::<Vec<_>>();
    folders.sort();
    warp::reply::json(&folders)
}
// Endpoint for getting a list of all of the available comics.
Endpoint for getting a list of all of the available comics.
Endpoint for getting a list of all of the available comics .
fn comic_list() -> Json {
    let mut folders = fs::read_dir(&CONFIG.img_folder)
        .unwrap()
        .filter_map(|el| {
            let info = el.ok()?;
            if info.path().is_dir() {
                Some(info.file_name().to_string_lossy().into_owned())
            } else {
                None
            }
        })
        .collect::<Vec<_>>();
    folders.sort();
    warp::reply::json(&folders)
}
fn comic_list ( ) -> Json { let mut folders = fs :: read_dir ( & CONFIG . img_folder ) . unwrap ( ) . filter_map ( | el | { let info = el . ok ( ) ? ; if info . path ( ) . is_dir ( ) { Some ( info . file_name ( ) . to_string_lossy ( ) . into_owned ( ) ) } else { None } } ) . collect :: < Vec < _ > > ( ) ; folders . sort ( ) ; warp :: reply :: json ( & folders ) }
Endpoint for getting a list of all of the available comics.
Endpoint for getting a list of all of the available comics .