fn max_height(&self) -> Result<i32> {
        let dimensions = |txt| text_size(self.init.scale(), self.init.font(), txt);
        let h: Vec<_> = self.text.iter().map(|t| dimensions(t).1).collect();
        let max_height = match h.iter().max_by_key(|&&x| x) {
            Some(val) => *val,
            None => return Err(ErrorKind::NoTextGiven.into()),
        };

        Ok(max_height)
    }
/// Returns the maximum height of the rendered text.
Returns the maximum height of the rendered text.
Returns the maximum height of the rendered text .
fn max_height(&self) -> Result<i32> {
        let dimensions = |txt| text_size(self.init.scale(), self.init.font(), txt);
        let h: Vec<_> = self.text.iter().map(|t| dimensions(t).1).collect();
        let max_height = match h.iter().max_by_key(|&&x| x) {
            Some(val) => *val,
            None => return Err(ErrorKind::NoTextGiven.into()),
        };
        Ok(max_height)
    }
fn max_height ( & self ) -> Result < i32 > { let dimensions = | txt | text_size ( self . init . scale ( ) , self . init . font ( ) , txt ) ; let h : Vec < _ > = self . text . iter ( ) . map ( | t | dimensions ( t ) . 1 ) . collect ( ) ; let max_height = match h . iter ( ) . max_by_key ( | & & x | x ) { Some ( val ) => * val , None => return Err ( ErrorKind :: NoTextGiven . into ( ) ) , } ; Ok ( max_height ) }
Returns the maximum height of the rendered text.
Returns the maximum height of the rendered text .
&self
&self