fn coord_from_sizeinfo(size: &SizeInfo) -> Option<COORD> {
    let cols = size.columns();
    let lines = size.screen_lines();

    if cols <= i16::MAX as usize && lines <= i16::MAX as usize {
        Some(COORD { X: cols as i16, Y: lines 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(size: &SizeInfo) -> Option<COORD> {
    let cols = size.columns();
    let lines = size.screen_lines();
    if cols <= i16::MAX as usize && lines <= i16::MAX as usize {
        Some(COORD { X: cols as i16, Y: lines as i16 })
    } else {
        None
    }
}
fn coord_from_sizeinfo ( size : & SizeInfo ) -> Option < COORD > { let cols = size . columns ( ) ; let lines = size . screen_lines ( ) ; if cols <= i16 :: MAX as usize && lines <= i16 :: MAX as usize { Some ( COORD { X : cols as i16 , Y : lines 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 .
size
&SizeInfo
size
&SizeInfo