Remove ResolvedLayerRules::empty()
Browse files at this commita78f07cd588fce2ac97294eb50228da09216d3bcParent: 765a2411 changed file +2 -22
- src/layer/mod.rs +2 -22
src/layer/mod.rsmodified+2 -22
| @@ -7,7 +7,7 @@ pub mod mapped; | ||
| 7 | 7 | pub use mapped::MappedLayer; |
| 8 | 8 | |
| 9 | 9 | /// Rules fully resolved for a layer-shell surface. |
| 10 | -#[derive(Debug, PartialEq)] | |
| 10 | +#[derive(Debug, Default, PartialEq)] | |
| 11 | 11 | pub struct ResolvedLayerRules { |
| 12 | 12 | /// Extra opacity to draw this layer surface with. |
| 13 | 13 | pub opacity: Option<f32>, |
| @@ -29,30 +29,10 @@ pub struct ResolvedLayerRules { | ||
| 29 | 29 | } |
| 30 | 30 | |
| 31 | 31 | impl ResolvedLayerRules { |
| 32 | - pub const fn empty() -> Self { | |
| 33 | - Self { | |
| 34 | - opacity: None, | |
| 35 | - block_out_from: None, | |
| 36 | - shadow: ShadowRule { | |
| 37 | - off: false, | |
| 38 | - on: false, | |
| 39 | - offset: None, | |
| 40 | - softness: None, | |
| 41 | - spread: None, | |
| 42 | - draw_behind_window: None, | |
| 43 | - color: None, | |
| 44 | - inactive_color: None, | |
| 45 | - }, | |
| 46 | - geometry_corner_radius: None, | |
| 47 | - place_within_backdrop: false, | |
| 48 | - baba_is_float: false, | |
| 49 | - } | |
| 50 | - } | |
| 51 | - | |
| 52 | 32 | pub fn compute(rules: &[LayerRule], surface: &LayerSurface, is_at_startup: bool) -> Self { |
| 53 | 33 | let _span = tracy_client::span!("ResolvedLayerRules::compute"); |
| 54 | 34 | |
| 55 | - let mut resolved = ResolvedLayerRules::empty(); | |
| 35 | + let mut resolved = ResolvedLayerRules::default(); | |
| 56 | 36 | |
| 57 | 37 | for rule in rules { |
| 58 | 38 | let matches = |m: &Match| { |