Replace clone with reference

This avoids an unnecessary allocation and memory copy
when printing the empty panel during line wrapping.
This commit is contained in:
Ethan P. 2024-02-10 02:21:58 -08:00
parent 5a2a20af42
commit 070c87c8cd
No known key found for this signature in database
GPG Key ID: 1BA2A0CC7C22B854

View File

@ -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;