pub fn layout(&mut self, metrics: &Font::MetricsMap) {
        // TODO(@MattWindsor91): don't hash on colour; it doesn't affect layout.
        let mut hasher = DefaultHasher::new();
        (&self.current_str, &self.options).hash(&mut hasher);
        let hash = hasher.finish();

        let str = mem::take(&mut self.current_str);
        if self.last_hash.replace(hash) != Some(hash) {
            self.actually_layout(metrics, str);
        }
    }
/// Lays out the current string, consuming it in the process.
///
/// Subsequent calls to the writing functions will now build a new string.
///
/// If the string and parameters are the same as the last time this renderer was used, there
/// will not be a full layout calculation.  This means it is useful to reuse writers across
/// frames.
Lays out the current string, consuming it in the process.
Subsequent calls to the writing functions will now build a new string.

If the string and parameters are the same as the last time this renderer was used, there
will not be a full layout calculation.  This means it is useful to reuse writers across
frames.
Lays out the current string consuming it in the process . Subsequent calls to the writing functions will now build a new string . If the string and parameters are the same as the last time this renderer was used there will not be a full layout calculation . This means it is useful to reuse writers across frames .
pub fn layout(&mut self, metrics: &Font::MetricsMap) {
        // TODO(@MattWindsor91): don't hash on colour; it doesn't affect layout.
        let mut hasher = DefaultHasher::new();
        (&self.current_str, &self.options).hash(&mut hasher);
        let hash = hasher.finish();
        let str = mem::take(&mut self.current_str);
        if self.last_hash.replace(hash) != Some(hash) {
            self.actually_layout(metrics, str);
        }
    }
pub fn layout ( & mut self , metrics : & Font :: MetricsMap ) { // TODO(@MattWindsor91): don't hash on colour; it doesn't affect layout. let mut hasher = DefaultHasher :: new ( ) ; ( & self . current_str , & self . options ) . hash ( & mut hasher ) ; let hash = hasher . finish ( ) ; let str = mem :: take ( & mut self . current_str ) ; if self . last_hash . replace ( hash ) != Some ( hash ) { self . actually_layout ( metrics , str ) ; } }
Lays out the current string, consuming it in the process.
Lays out the current string consuming it in the process .
&mut self
metrics
&Font::MetricsMap