From bbc102d59286ae9066d265a676d65c180c5551af Mon Sep 17 00:00:00 2001 From: lazypassion <25536767+lazypassion@users.noreply.github.com> Date: Wed, 31 Mar 2021 18:26:52 -0400 Subject: [PATCH 01/13] updating FlexParams to protect against flex values <= 0.0 - there is still more work to do to figure out how Flex children use 0.0 flex value --- druid/src/widget/flex.rs | 57 ++++++++++++++++++++++++++-------------- 1 file changed, 38 insertions(+), 19 deletions(-) diff --git a/druid/src/widget/flex.rs b/druid/src/widget/flex.rs index a91cfdc410..1d3b0fc7df 100644 --- a/druid/src/widget/flex.rs +++ b/druid/src/widget/flex.rs @@ -338,11 +338,24 @@ impl FlexParams { /// can pass an `f64` to any of the functions that take `FlexParams`. /// /// By default, the widget uses the alignment of its parent [`Flex`] container. + /// If the provided flex value is 0.0 or less, the flex value will default to 1.0. /// /// - /// [`Flex`]: struct.Flex.html - /// [`CrossAxisAlignment`]: enum.CrossAxisAlignment.html + /// [`Flex`]: crate::widget::Flex + /// [`CrossAxisAlignment`]: crate::widget::CrossAxisAlignment pub fn new(flex: f64, alignment: impl Into>) -> Self { + let flex = if flex <= 0.0 { + debug_assert!( + flex <= 0.0, + "flex value should not be <= 0.0. Flex given was: {}", + flex + ); + tracing::warn!("Provided flex value was <= 0.0: {}", flex); + 1.0 + } else { + flex + }; + FlexParams { flex, alignment: alignment.into(), @@ -505,9 +518,13 @@ impl Flex { /// /// See also [`with_child`]. /// - /// [`with_child`]: #method.with_child + /// [`with_child`]: crate::widget::Flex::with_child pub fn add_child(&mut self, child: impl Widget + 'static) { - self.add_flex_child(child, 0.0); + let child = Child::Fixed { + widget: WidgetPod::new(Box::new(child)), + alignment: None, + }; + self.children.push(child); } /// Add a flexible child widget. @@ -541,17 +558,10 @@ impl Flex { params: impl Into, ) { let params = params.into(); - let child = if params.flex == 0.0 { - Child::Fixed { - widget: WidgetPod::new(Box::new(child)), - alignment: params.alignment, - } - } else { - Child::Flex { - widget: WidgetPod::new(Box::new(child)), - alignment: params.alignment, - flex: params.flex, - } + let child = Child::Flex { + widget: WidgetPod::new(Box::new(child)), + alignment: params.alignment, + flex: params.flex, }; self.children.push(child); } @@ -941,10 +951,7 @@ impl Iterator for Spacing { impl From for FlexParams { fn from(flex: f64) -> FlexParams { - FlexParams { - flex, - alignment: None, - } + FlexParams::new(flex, None) } } @@ -1051,4 +1058,16 @@ mod tests { assert_eq!(vec(a, 38., 5), vec![4., 7., 8., 8., 7., 4.]); assert_eq!(vec(a, 39., 5), vec![4., 8., 7., 8., 8., 4.]); } + #[test] + fn test_invalid_flex_params() { + use float_cmp::approx_eq; + let params = FlexParams::new(0.0, None); + approx_eq!(f64, params.flex, 1.0, ulps = 2); + + let params = FlexParams::new(-0.0, None); + approx_eq!(f64, params.flex, 1.0, ulps = 2); + + let params = FlexParams::new(-1.0, None); + approx_eq!(f64, params.flex, 1.0, ulps = 2); + } } From feacd545b9adac0fa49349bc600cb0037ea28309 Mon Sep 17 00:00:00 2001 From: lazypassion <25536767+lazypassion@users.noreply.github.com> Date: Thu, 1 Apr 2021 18:14:49 -0400 Subject: [PATCH 02/13] protecting from invalid values for flex space and fixed space --- druid/src/widget/flex.rs | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/druid/src/widget/flex.rs b/druid/src/widget/flex.rs index 1d3b0fc7df..f4a2d9e00f 100644 --- a/druid/src/widget/flex.rs +++ b/druid/src/widget/flex.rs @@ -585,13 +585,29 @@ impl Flex { /// /// [`add_default_spacer`]: #method.add_default_spacer pub fn add_spacer(&mut self, len: impl Into>) { - let value = len.into(); + let mut value = len.into(); + if let KeyOrValue::Concrete(ref mut len) = value { + if *len < 0.0 { + tracing::warn!("Provided spacer length was less than 0. Value was: {}", len); + } + *len = len.clamp(0.0, f64::MAX); + } + let new_child = Child::FixedSpacer(value, 0.0); self.children.push(new_child); } /// Add an empty spacer widget with a specific `flex` factor. pub fn add_flex_spacer(&mut self, flex: f64) { + if flex < 0.0 { + debug_assert!( + flex >= 0.0, + "flex value for space should be >= 0, received: {}", + flex + ); + tracing::warn!("Provided flex value was < 0: {}", flex); + } + let flex = if flex < 0.0 { 0.0 } else { flex }; let new_child = Child::FlexedSpacer(flex, 0.0); self.children.push(new_child); } @@ -662,6 +678,11 @@ impl Widget for Flex { } Child::FixedSpacer(kv, calculated_siz) => { *calculated_siz = kv.resolve(env); + *calculated_siz = if *calculated_siz < 0.0 { + 0.0 + } else { + *calculated_siz + }; major_non_flex += *calculated_siz; } Child::Flex { flex, .. } | Child::FlexedSpacer(flex, _) => flex_sum += *flex, From 80a4891c66fa97c03a6051a6deb0b4ba35fce46b Mon Sep 17 00:00:00 2001 From: lazypassion <25536767+lazypassion@users.noreply.github.com> Date: Thu, 1 Apr 2021 18:22:44 -0400 Subject: [PATCH 03/13] fixing up some of the debug messages and a doc comment --- druid/src/widget/flex.rs | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/druid/src/widget/flex.rs b/druid/src/widget/flex.rs index f4a2d9e00f..a1c9e0e354 100644 --- a/druid/src/widget/flex.rs +++ b/druid/src/widget/flex.rs @@ -347,10 +347,10 @@ impl FlexParams { let flex = if flex <= 0.0 { debug_assert!( flex <= 0.0, - "flex value should not be <= 0.0. Flex given was: {}", + "flex value should not be less than equal to 0.0. Flex given was: {}", flex ); - tracing::warn!("Provided flex value was <= 0.0: {}", flex); + tracing::warn!("Provided flex value was less than equal to 0.0: {}", flex); 1.0 } else { flex @@ -550,8 +550,8 @@ impl Flex { /// my_row.add_flex_child(Slider::new(), FlexParams::new(1.0, CrossAxisAlignment::End)); /// ``` /// - /// [`FlexParams`]: struct.FlexParams.html - /// [`with_flex_child`]: #method.with_flex_child + /// [`FlexParams`]: crate::widget::FlexParams + /// [`with_flex_child`]: crate::widget::Flex::with_flex_child pub fn add_flex_child( &mut self, child: impl Widget + 'static, @@ -583,7 +583,7 @@ impl Flex { /// If you are laying out standard controls in this container, you should /// generally prefer to use [`add_default_spacer`]. /// - /// [`add_default_spacer`]: #method.add_default_spacer + /// [`add_default_spacer`]: crate::widget::Flex::add_default_spacer pub fn add_spacer(&mut self, len: impl Into>) { let mut value = len.into(); if let KeyOrValue::Concrete(ref mut len) = value { @@ -599,15 +599,17 @@ impl Flex { /// Add an empty spacer widget with a specific `flex` factor. pub fn add_flex_spacer(&mut self, flex: f64) { - if flex < 0.0 { + let flex = if flex < 0.0 { debug_assert!( flex >= 0.0, - "flex value for space should be >= 0, received: {}", + "flex value for space should be greater than equal to 0, received: {}", flex ); - tracing::warn!("Provided flex value was < 0: {}", flex); - } - let flex = if flex < 0.0 { 0.0 } else { flex }; + tracing::warn!("Provided flex value was less than 0: {}", flex); + 0.0 + } else { + flex + }; let new_child = Child::FlexedSpacer(flex, 0.0); self.children.push(new_child); } @@ -679,6 +681,10 @@ impl Widget for Flex { Child::FixedSpacer(kv, calculated_siz) => { *calculated_siz = kv.resolve(env); *calculated_siz = if *calculated_siz < 0.0 { + tracing::warn!( + "Length provided to fixed spacer was les than 0: {}", + *calculated_siz + ); 0.0 } else { *calculated_siz From b764b3c81e087de532d5300ce90d4bf00e6ee11a Mon Sep 17 00:00:00 2001 From: lazypassion <25536767+lazypassion@users.noreply.github.com> Date: Thu, 1 Apr 2021 18:28:18 -0400 Subject: [PATCH 04/13] fixing incorrect debug assertion --- druid/src/widget/flex.rs | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/druid/src/widget/flex.rs b/druid/src/widget/flex.rs index a1c9e0e354..135f332443 100644 --- a/druid/src/widget/flex.rs +++ b/druid/src/widget/flex.rs @@ -344,16 +344,16 @@ impl FlexParams { /// [`Flex`]: crate::widget::Flex /// [`CrossAxisAlignment`]: crate::widget::CrossAxisAlignment pub fn new(flex: f64, alignment: impl Into>) -> Self { - let flex = if flex <= 0.0 { + let flex = if flex > 0.0 { + flex + } else { debug_assert!( - flex <= 0.0, + flex > 0.0, "flex value should not be less than equal to 0.0. Flex given was: {}", flex ); tracing::warn!("Provided flex value was less than equal to 0.0: {}", flex); 1.0 - } else { - flex }; FlexParams { @@ -599,7 +599,9 @@ impl Flex { /// Add an empty spacer widget with a specific `flex` factor. pub fn add_flex_spacer(&mut self, flex: f64) { - let flex = if flex < 0.0 { + let flex = if flex >= 0.0 { + flex + } else { debug_assert!( flex >= 0.0, "flex value for space should be greater than equal to 0, received: {}", @@ -607,8 +609,6 @@ impl Flex { ); tracing::warn!("Provided flex value was less than 0: {}", flex); 0.0 - } else { - flex }; let new_child = Child::FlexedSpacer(flex, 0.0); self.children.push(new_child); @@ -680,14 +680,14 @@ impl Widget for Flex { } Child::FixedSpacer(kv, calculated_siz) => { *calculated_siz = kv.resolve(env); - *calculated_siz = if *calculated_siz < 0.0 { + *calculated_siz = if *calculated_siz >= 0.0 { + *calculated_siz + } else { tracing::warn!( "Length provided to fixed spacer was les than 0: {}", *calculated_siz ); 0.0 - } else { - *calculated_siz }; major_non_flex += *calculated_siz; } From ac1c6e2b1b70d7bb0d5a7aa88341194db3a83232 Mon Sep 17 00:00:00 2001 From: lazypassion <25536767+lazypassion@users.noreply.github.com> Date: Fri, 2 Apr 2021 10:54:56 -0400 Subject: [PATCH 05/13] updating `with_child` to use `add_child` --- druid/src/widget/flex.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/druid/src/widget/flex.rs b/druid/src/widget/flex.rs index 135f332443..d9b2f6e0fd 100644 --- a/druid/src/widget/flex.rs +++ b/druid/src/widget/flex.rs @@ -429,7 +429,7 @@ impl Flex { /// /// Convenient for assembling a group of widgets in a single expression. pub fn with_child(mut self, child: impl Widget + 'static) -> Self { - self.add_flex_child(child, 0.0); + self.add_child(child); self } @@ -1086,6 +1086,7 @@ mod tests { assert_eq!(vec(a, 39., 5), vec![4., 8., 7., 8., 8., 4.]); } #[test] + #[should_panic] fn test_invalid_flex_params() { use float_cmp::approx_eq; let params = FlexParams::new(0.0, None); From 44796a17c99891495a5dae70585e54ffda6e5303 Mon Sep 17 00:00:00 2001 From: lazypassion <25536767+lazypassion@users.noreply.github.com> Date: Fri, 2 Apr 2021 11:15:57 -0400 Subject: [PATCH 06/13] adding tests that work in release and debug --- druid/src/widget/flex.rs | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/druid/src/widget/flex.rs b/druid/src/widget/flex.rs index d9b2f6e0fd..41e7f8880b 100644 --- a/druid/src/widget/flex.rs +++ b/druid/src/widget/flex.rs @@ -1086,6 +1086,27 @@ mod tests { assert_eq!(vec(a, 39., 5), vec![4., 8., 7., 8., 8., 4.]); } #[test] + // #[should_panic] + #[cfg(not(debug_assertions))] + fn test_invalid_flex_params() { + // if cfg!(debug_assertions) { + // println!("Debugging enabled"); + // } else { + // println!("Debugging disabled"); + // } + use float_cmp::approx_eq; + let params = FlexParams::new(0.0, None); + approx_eq!(f64, params.flex, 1.0, ulps = 2); + + let params = FlexParams::new(-0.0, None); + approx_eq!(f64, params.flex, 1.0, ulps = 2); + + let params = FlexParams::new(-1.0, None); + approx_eq!(f64, params.flex, 1.0, ulps = 2); + } + + #[test] + #[cfg(debug_assertions)] #[should_panic] fn test_invalid_flex_params() { use float_cmp::approx_eq; From 5de90f7b293e2197bab6392f4d3e6b84b57f6a9b Mon Sep 17 00:00:00 2001 From: lazypassion <25536767+lazypassion@users.noreply.github.com> Date: Fri, 2 Apr 2021 11:16:25 -0400 Subject: [PATCH 07/13] removing unnecessary comments --- druid/src/widget/flex.rs | 6 ------ 1 file changed, 6 deletions(-) diff --git a/druid/src/widget/flex.rs b/druid/src/widget/flex.rs index 41e7f8880b..1507e60efa 100644 --- a/druid/src/widget/flex.rs +++ b/druid/src/widget/flex.rs @@ -1086,14 +1086,8 @@ mod tests { assert_eq!(vec(a, 39., 5), vec![4., 8., 7., 8., 8., 4.]); } #[test] - // #[should_panic] #[cfg(not(debug_assertions))] fn test_invalid_flex_params() { - // if cfg!(debug_assertions) { - // println!("Debugging enabled"); - // } else { - // println!("Debugging disabled"); - // } use float_cmp::approx_eq; let params = FlexParams::new(0.0, None); approx_eq!(f64, params.flex, 1.0, ulps = 2); From 5f04521fbadafc915d7aebc83187a99d6f0d88b4 Mon Sep 17 00:00:00 2001 From: lazypassion <25536767+lazypassion@users.noreply.github.com> Date: Sat, 3 Apr 2021 00:08:04 -0400 Subject: [PATCH 08/13] updating with suggested fixes --- druid/src/widget/flex.rs | 57 +++++++++++++++++++--------------------- 1 file changed, 27 insertions(+), 30 deletions(-) diff --git a/druid/src/widget/flex.rs b/druid/src/widget/flex.rs index 1507e60efa..a14e2a0e54 100644 --- a/druid/src/widget/flex.rs +++ b/druid/src/widget/flex.rs @@ -341,20 +341,14 @@ impl FlexParams { /// If the provided flex value is 0.0 or less, the flex value will default to 1.0. /// /// - /// [`Flex`]: crate::widget::Flex - /// [`CrossAxisAlignment`]: crate::widget::CrossAxisAlignment + /// [`Flex`]: Flex + /// [`CrossAxisAlignment`]: CrossAxisAlignment pub fn new(flex: f64, alignment: impl Into>) -> Self { - let flex = if flex > 0.0 { - flex - } else { - debug_assert!( - flex > 0.0, - "flex value should not be less than equal to 0.0. Flex given was: {}", - flex - ); - tracing::warn!("Provided flex value was less than equal to 0.0: {}", flex); - 1.0 - }; + if flex <= 0.0 { + debug_panic!("Flex value should be > 0.0. Flex given was: {}", flex); + } + + let flex = flex.max(0.0); FlexParams { flex, @@ -518,7 +512,7 @@ impl Flex { /// /// See also [`with_child`]. /// - /// [`with_child`]: crate::widget::Flex::with_child + /// [`with_child`]: Flex::with_child pub fn add_child(&mut self, child: impl Widget + 'static) { let child = Child::Fixed { widget: WidgetPod::new(Box::new(child)), @@ -550,18 +544,26 @@ impl Flex { /// my_row.add_flex_child(Slider::new(), FlexParams::new(1.0, CrossAxisAlignment::End)); /// ``` /// - /// [`FlexParams`]: crate::widget::FlexParams - /// [`with_flex_child`]: crate::widget::Flex::with_flex_child + /// [`FlexParams`]: FlexParams + /// [`with_flex_child`]: Flex::with_flex_child pub fn add_flex_child( &mut self, child: impl Widget + 'static, params: impl Into, ) { let params = params.into(); - let child = Child::Flex { - widget: WidgetPod::new(Box::new(child)), - alignment: params.alignment, - flex: params.flex, + let child = if params.flex > 0.0 { + Child::Flex { + widget: WidgetPod::new(Box::new(child)), + alignment: params.alignment, + flex: params.flex, + } + } else { + tracing::warn!("Flex value should be > 0.0. To add a non-flex child use the add_child or with_child methods. See the Flex docs for more information: https://docs.rs/druid/0.7.0/druid/widget/struct.Flex.html"); + Child::Fixed { + widget: WidgetPod::new(Box::new(child)), + alignment: None, + } }; self.children.push(child); } @@ -583,7 +585,7 @@ impl Flex { /// If you are laying out standard controls in this container, you should /// generally prefer to use [`add_default_spacer`]. /// - /// [`add_default_spacer`]: crate::widget::Flex::add_default_spacer + /// [`add_default_spacer`]: Flex::add_default_spacer pub fn add_spacer(&mut self, len: impl Into>) { let mut value = len.into(); if let KeyOrValue::Concrete(ref mut len) = value { @@ -680,15 +682,10 @@ impl Widget for Flex { } Child::FixedSpacer(kv, calculated_siz) => { *calculated_siz = kv.resolve(env); - *calculated_siz = if *calculated_siz >= 0.0 { - *calculated_siz - } else { - tracing::warn!( - "Length provided to fixed spacer was les than 0: {}", - *calculated_siz - ); - 0.0 - }; + if *calculated_siz < 0.0 { + tracing::warn!("Length provided to fixed spacer was less than 0"); + } + *calculated_siz = calculated_siz.max(0.0); major_non_flex += *calculated_siz; } Child::Flex { flex, .. } | Child::FlexedSpacer(flex, _) => flex_sum += *flex, From 2b4aa9deb82f3a0fd250f2f0755279080dd59275 Mon Sep 17 00:00:00 2001 From: lazypassion <25536767+lazypassion@users.noreply.github.com> Date: Sat, 3 Apr 2021 00:09:28 -0400 Subject: [PATCH 09/13] removing wrong doc comment --- druid/src/widget/flex.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/druid/src/widget/flex.rs b/druid/src/widget/flex.rs index a14e2a0e54..ab0c9009a5 100644 --- a/druid/src/widget/flex.rs +++ b/druid/src/widget/flex.rs @@ -338,7 +338,6 @@ impl FlexParams { /// can pass an `f64` to any of the functions that take `FlexParams`. /// /// By default, the widget uses the alignment of its parent [`Flex`] container. - /// If the provided flex value is 0.0 or less, the flex value will default to 1.0. /// /// /// [`Flex`]: Flex From f7babd0eafd40839f5a1a0feaf4c34efa70cec39 Mon Sep 17 00:00:00 2001 From: lazypassion <25536767+lazypassion@users.noreply.github.com> Date: Sat, 3 Apr 2021 00:16:31 -0400 Subject: [PATCH 10/13] fixing new test case --- druid/src/widget/flex.rs | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/druid/src/widget/flex.rs b/druid/src/widget/flex.rs index ab0c9009a5..c25b826220 100644 --- a/druid/src/widget/flex.rs +++ b/druid/src/widget/flex.rs @@ -1081,22 +1081,8 @@ mod tests { assert_eq!(vec(a, 38., 5), vec![4., 7., 8., 8., 7., 4.]); assert_eq!(vec(a, 39., 5), vec![4., 8., 7., 8., 8., 4.]); } - #[test] - #[cfg(not(debug_assertions))] - fn test_invalid_flex_params() { - use float_cmp::approx_eq; - let params = FlexParams::new(0.0, None); - approx_eq!(f64, params.flex, 1.0, ulps = 2); - - let params = FlexParams::new(-0.0, None); - approx_eq!(f64, params.flex, 1.0, ulps = 2); - - let params = FlexParams::new(-1.0, None); - approx_eq!(f64, params.flex, 1.0, ulps = 2); - } #[test] - #[cfg(debug_assertions)] #[should_panic] fn test_invalid_flex_params() { use float_cmp::approx_eq; From a1acf7ce8642c7816d18bc168476fb4ac4435ac9 Mon Sep 17 00:00:00 2001 From: lazypassion <25536767+lazypassion@users.noreply.github.com> Date: Mon, 5 Apr 2021 12:51:14 -0400 Subject: [PATCH 11/13] adding a little formatting to warning message --- druid/src/widget/flex.rs | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/druid/src/widget/flex.rs b/druid/src/widget/flex.rs index c25b826220..5111674d9c 100644 --- a/druid/src/widget/flex.rs +++ b/druid/src/widget/flex.rs @@ -338,10 +338,6 @@ impl FlexParams { /// can pass an `f64` to any of the functions that take `FlexParams`. /// /// By default, the widget uses the alignment of its parent [`Flex`] container. - /// - /// - /// [`Flex`]: Flex - /// [`CrossAxisAlignment`]: CrossAxisAlignment pub fn new(flex: f64, alignment: impl Into>) -> Self { if flex <= 0.0 { debug_panic!("Flex value should be > 0.0. Flex given was: {}", flex); @@ -543,8 +539,8 @@ impl Flex { /// my_row.add_flex_child(Slider::new(), FlexParams::new(1.0, CrossAxisAlignment::End)); /// ``` /// - /// [`FlexParams`]: FlexParams /// [`with_flex_child`]: Flex::with_flex_child + #[instrument(name = "Flex", level = "trace", skip(self, child, params))] pub fn add_flex_child( &mut self, child: impl Widget + 'static, @@ -558,7 +554,7 @@ impl Flex { flex: params.flex, } } else { - tracing::warn!("Flex value should be > 0.0. To add a non-flex child use the add_child or with_child methods. See the Flex docs for more information: https://docs.rs/druid/0.7.0/druid/widget/struct.Flex.html"); + tracing::warn!("Flex value should be > 0.0. To add a non-flex child use the add_child or with_child methods.\nSee the docs for more information: https://docs.rs/druid/0.7.0/druid/widget/struct.Flex.html"); Child::Fixed { widget: WidgetPod::new(Box::new(child)), alignment: None, From 23f45484dcc4b94d7f6d13fb721bcf35c4e3ea2b Mon Sep 17 00:00:00 2001 From: lazypassion <25536767+lazypassion@users.noreply.github.com> Date: Mon, 5 Apr 2021 13:25:53 -0400 Subject: [PATCH 12/13] updating changelog --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c8b0903edf..0731d004fb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -40,6 +40,7 @@ You can find its changes [documented below](#070---2021-01-01). - Padding is generic over child widget, impls WidgetWrapper ([#1634] by [@cmyr]) - Menu support was rewritten with support for `Data` ([#1625] by [@jneem]) - Update to piet v0.4.0 (rich text on linux!) ([#1677] by [@cmyr]) +- Flex values that are less than 0.0 will default to 0.0 and warn in release. It will panic in debug mode. ([#1691] by [@arthmis]) ### Deprecated @@ -441,6 +442,7 @@ Last release without a changelog :( [@SecondFlight]: https://github.com/SecondFlight [@lord]: https://github.com/lord [@Lejero]: https://github.com/Lejero +[@arthmis]: https://github.com/arthmis [#599]: https://github.com/linebender/druid/pull/599 [#611]: https://github.com/linebender/druid/pull/611 @@ -657,6 +659,7 @@ Last release without a changelog :( [#1660]: https://github.com/linebender/druid/pull/1660 [#1662]: https://github.com/linebender/druid/pull/1662 [#1677]: https://github.com/linebender/druid/pull/1677 +[#1691]: https://github.com/linebender/druid/pull/1691 [Unreleased]: https://github.com/linebender/druid/compare/v0.7.0...master [0.7.0]: https://github.com/linebender/druid/compare/v0.6.0...v0.7.0 From 5075b7f254c64aca22c17cf22ee7bebfddb238f4 Mon Sep 17 00:00:00 2001 From: lazypassion <25536767+lazypassion@users.noreply.github.com> Date: Mon, 5 Apr 2021 17:12:50 -0400 Subject: [PATCH 13/13] removing instrument macro --- druid/src/widget/flex.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/druid/src/widget/flex.rs b/druid/src/widget/flex.rs index 5111674d9c..f8254666ae 100644 --- a/druid/src/widget/flex.rs +++ b/druid/src/widget/flex.rs @@ -540,7 +540,6 @@ impl Flex { /// ``` /// /// [`with_flex_child`]: Flex::with_flex_child - #[instrument(name = "Flex", level = "trace", skip(self, child, params))] pub fn add_flex_child( &mut self, child: impl Widget + 'static,