perf: general minor performance optimisations

Notably there is some code cleanup with the zooming functionality, I've
created a new module to reduce code duplication.
This commit is contained in:
Cheong Lau 2025-10-28 13:10:40 +10:00
parent 5f729829d7
commit bd1fa1f0a9
16 changed files with 971 additions and 1109 deletions

View file

@ -25,7 +25,7 @@ pub struct ClipboardCopy {
}
impl ClipboardCopy {
pub fn new<P: AsRef<Path>>(kind: ClipboardKind, paths: &[P]) -> Self {
pub fn new<P: AsRef<Path>>(kind: ClipboardKind, paths: impl IntoIterator<Item = P>) -> Self {
let available = vec![
"text/plain".to_string(),
"text/plain;charset=utf-8".to_string(),