// Returns stream with known physical (only!) partitions
Returns stream with known physical (only!) partitions
Returns stream with known physical ( only! ) partitions
fn known_filesystems() -> impl Stream<Item = Result<FileSystem>> {
    rt::fs::read_lines("/proc/filesystems")
        .try_flatten_stream()
        .map_err(Error::from)
        .try_filter_map(|line| {
            let mut parts = line.splitn(2, '\t');
            let nodev = match parts.next() {
                Some("nodev") => true,
                _ => false,
            };
            let fs = match parts.next() {
                Some("zfs") if nodev => FileSystem::from_str("zfs"),
                Some(filesystem) if !nodev => FileSystem::from_str(filesystem),
                _ => return future::ok(None),
            };
            future::ready(fs.map(Some))
        })
}
fn known_filesystems ( ) -> impl Stream < Item = Result < FileSystem > > { rt :: fs :: read_lines ( " " ) . try_flatten_stream ( ) . map_err ( Error :: from ) . try_filter_map ( | line | { let mut parts = line . splitn ( 2 , '\t' ) ; let nodev = match parts . next ( ) { Some ( " " ) => true , _ => false , } ; let fs = match parts . next ( ) { Some ( " " ) if nodev => FileSystem :: from_str ( " " ) , Some ( filesystem ) if ! nodev => FileSystem :: from_str ( filesystem ) , _ => return future :: ok ( None ) , } ; future :: ready ( fs . map ( Some ) ) } ) }
Returns stream with known physical (only!)
Returns stream with known physical ( only! )