Replace clone with reference

This avoids an unnecessary allocation and memory copy
when printing the empty panel during line wrapping.
pull/2855/head
Ethan P. 4 months ago
parent 5a2a20af42
commit 070c87c8cd
No known key found for this signature in database
GPG Key ID: 1BA2A0CC7C22B854

@ -705,7 +705,7 @@ impl<'a> Printer for InteractivePrinter<'a> {
background_color
),
self.ansi_style.to_reset_sequence(),
panel_wrap.clone().unwrap()
panel_wrap.as_ref().unwrap()
)?;
cursor = 0;

Loading…
Cancel
Save