diff options
| author | Ivan Molodetskikh <yalterz@gmail.com> | 2023-12-24 17:38:13 +0400 |
|---|---|---|
| committer | Ivan Molodetskikh <yalterz@gmail.com> | 2023-12-24 17:38:13 +0400 |
| commit | be2e551a89abb98099f094f73889d6d0cc46c87c (patch) | |
| tree | 28e13fb690fc207fa46361b0670df52181552042 /src/utils.rs | |
| parent | ed3080d908001bf468789b8f47f893e00306135d (diff) | |
| download | niri-be2e551a89abb98099f094f73889d6d0cc46c87c.tar.gz niri-be2e551a89abb98099f094f73889d6d0cc46c87c.tar.bz2 niri-be2e551a89abb98099f094f73889d6d0cc46c87c.zip | |
Move clones up from find_window_and_output
Diffstat (limited to 'src/utils.rs')
| -rw-r--r-- | src/utils.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/utils.rs b/src/utils.rs index 07c737df..08606a53 100644 --- a/src/utils.rs +++ b/src/utils.rs @@ -17,6 +17,10 @@ use smithay::utils::{Logical, Point, Rectangle, Size}; use crate::config::Config; +pub fn clone2<T: Clone, U: Clone>(t: (&T, &U)) -> (T, U) { + (t.0.clone(), t.1.clone()) +} + pub fn get_monotonic_time() -> Duration { let ts = clock_gettime(ClockId::Monotonic); Duration::new(ts.tv_sec as u64, ts.tv_nsec as u32) |
