@@ -31,7 +31,6 @@ use crate::vminterface::{AvmObject, Instantiator};
3131use chrono:: DateTime ;
3232use chrono:: Utc ;
3333use core:: fmt;
34- use either:: Either ;
3534use gc_arena:: { Collect , Gc , GcCell , Mutation } ;
3635use ruffle_render:: commands:: CommandHandler ;
3736use ruffle_render:: quality:: StageQuality ;
@@ -1912,19 +1911,15 @@ impl<'gc> EditText<'gc> {
19121911 self . 0 . read ( ) . layout . lines ( ) . len ( )
19131912 }
19141913
1915- /// Calculate the layout metrics for a given line .
1914+ /// Calculate the layout metrics.
19161915 ///
1917- /// Returns `None` if the line does not exist or there is not enough data
1918- /// about the line to calculate metrics with.
1919- pub fn layout_metrics ( self , line : Option < usize > ) -> Option < LayoutMetrics > {
1916+ /// Returns `None` if there is not enough data
1917+ /// about the layout to calculate metrics with.
1918+ pub fn layout_metrics ( self ) -> Option < LayoutMetrics > {
19201919 let layout = & self . 0 . read ( ) . layout ;
1921- let line = line. and_then ( |line| layout. lines ( ) . get ( line) ) ;
19221920
1923- let ( boxes, union_bounds) = if let Some ( line) = line {
1924- ( Either :: Left ( line. boxes_iter ( ) ) , line. interior_bounds ( ) )
1925- } else {
1926- ( Either :: Right ( layout. boxes_iter ( ) ) , layout. bounds ( ) )
1927- } ;
1921+ let boxes = layout. boxes_iter ( ) ;
1922+ let union_bounds = layout. bounds ( ) ;
19281923
19291924 let mut first_font = None ;
19301925 let mut first_format = None ;
0 commit comments