|
| 1 | +use std::fmt::Display; |
| 2 | + |
1 | 3 | pub mod dummy;
|
2 | 4 | pub mod hyprland;
|
3 | 5 |
|
@@ -47,20 +49,20 @@ impl<'a> Configure<'a> {
|
47 | 49 | }
|
48 | 50 | }
|
49 | 51 |
|
50 |
| -impl<'a> ToString for Configure<'a> { |
51 |
| - fn to_string(&self) -> String { |
| 52 | +impl Display for Configure<'_> { |
| 53 | + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { |
52 | 54 | match self {
|
53 |
| - Configure::Mirror(_) => "Mirror".to_string(), |
54 |
| - Configure::LeftOf(_) => "Left of".to_string(), |
55 |
| - Configure::RightOf(_) => "Right of".to_string(), |
56 |
| - Configure::Below(_) => "Below".to_string(), |
57 |
| - Configure::Above(_) => "Above".to_string(), |
58 |
| - Configure::Zero => "Zero".to_string(), |
| 55 | + Configure::Mirror(_) => f.write_str("Mirror"), |
| 56 | + Configure::LeftOf(_) => f.write_str("Left of"), |
| 57 | + Configure::RightOf(_) => f.write_str("Right of"), |
| 58 | + Configure::Below(_) => f.write_str("Below"), |
| 59 | + Configure::Above(_) => f.write_str("Above"), |
| 60 | + Configure::Zero => f.write_str("Zero"), |
59 | 61 | }
|
60 | 62 | }
|
61 | 63 | }
|
62 | 64 |
|
63 |
| -impl<'a> From<&Configure<'a>> for u64 { |
| 65 | +impl From<&Configure<'_>> for u64 { |
64 | 66 | fn from(configure: &Configure) -> u64 {
|
65 | 67 | match configure {
|
66 | 68 | Configure::Mirror(_) => 0,
|
|
0 commit comments