fn coord_from_sizeinfo(sizeinfo: &SizeInfo) -> Option<COORD> {
    let cols = sizeinfo.cols().0;
    let lines = sizeinfo.lines().0;

    if cols <= i16::MAX as usize && lines <= i16::MAX as usize {
        Some(COORD { X: sizeinfo.cols().0 as i16, Y: sizeinfo.lines().0 as i16 })
    } else {
        None
    }
}
/// Helper to build a COORD from a SizeInfo, returning None in overflow cases.
Helper to build a COORD from a SizeInfo, returning None in overflow cases.
Helper to build a COORD from a SizeInfo returning None in overflow cases .
fn coord_from_sizeinfo(sizeinfo: &SizeInfo) -> Option<COORD> {
    let cols = sizeinfo.cols().0;
    let lines = sizeinfo.lines().0;
    if cols <= i16::MAX as usize && lines <= i16::MAX as usize {
        Some(COORD { X: sizeinfo.cols().0 as i16, Y: sizeinfo.lines().0 as i16 })
    } else {
        None
    }
}
fn coord_from_sizeinfo ( sizeinfo : & SizeInfo ) -> Option < COORD > { let cols = sizeinfo . cols ( ) . 0 ; let lines = sizeinfo . lines ( ) . 0 ; if cols <= i16 :: MAX as usize && lines <= i16 :: MAX as usize { Some ( COORD { X : sizeinfo . cols ( ) . 0 as i16 , Y : sizeinfo . lines ( ) . 0 as i16 } ) } else { None } }
Helper to build a COORD from a SizeInfo, returning None in overflow cases.
Helper to build a COORD from a SizeInfo returning None in overflow cases .
sizeinfo
&SizeInfo