From e8cf5f76acdea6091083cb6998aa479b96b2c2e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=C3=A1niel=20Buga?= Date: Tue, 10 Oct 2023 14:25:50 +0200 Subject: [PATCH] Add LinearLayout::inner and inner_mut --- CHANGELOG.md | 1 + src/layout/linear/mod.rs | 12 ++++++++++++ 2 files changed, 13 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8266b21..de90e83 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ ## New * `LinearLayout` now implements `ViewGroup` +* `LinearLayout::inner{_mut}` 0.3.2 (2023-08-23) ================== diff --git a/src/layout/linear/mod.rs b/src/layout/linear/mod.rs index 9bbd408..d82be9e 100644 --- a/src/layout/linear/mod.rs +++ b/src/layout/linear/mod.rs @@ -311,6 +311,18 @@ where self } + + /// Returns a reference to the contained views. + #[inline] + pub fn inner(&self) -> &VG { + &self.views + } + + /// Returns a mutable reference to the contained views. + #[inline] + pub fn inner_mut(&mut self) -> &mut VG { + &mut self.views + } } impl View for LinearLayout