all lists on lists.proxmox.com
 help / color / mirror / Atom feed
* [pdm-devel] [PATCH proxmox-yew-widget-toolkit 1/1] data table: fix using str with get_property
@ 2025-08-20 11:58 Stefan Hanreich
  2025-08-21  8:46 ` [pdm-devel] applied: " Dominik Csapak
  0 siblings, 1 reply; 2+ messages in thread
From: Stefan Hanreich @ 2025-08-20 11:58 UTC (permalink / raw)
  To: pdm-devel

Without the ?Sized trait bound, one cannot use str as the type for
get_property. Since we do not need the implicit trait bound here, we
can make the Sized bound optional, thus enabling the usage of str for
get_property.

Signed-off-by: Stefan Hanreich <s.hanreich@proxmox.com>
---
 src/widget/data_table/column.rs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/widget/data_table/column.rs b/src/widget/data_table/column.rs
index 016be99..1b95c3e 100644
--- a/src/widget/data_table/column.rs
+++ b/src/widget/data_table/column.rs
@@ -300,7 +300,7 @@ impl<T: 'static> DataTableColumn<T> {
 
     /// Builder style method to set a get_property_fn for renderer and sorter
     /// the given fn must return a reference
-    pub fn get_property<E: Ord + std::fmt::Display>(
+    pub fn get_property<E: Ord + std::fmt::Display + ?Sized>(
         self,
         get_property_fn: impl 'static + Fn(&T) -> &E,
     ) -> Self {
-- 
2.47.2


_______________________________________________
pdm-devel mailing list
pdm-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pdm-devel


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-08-21  8:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-08-20 11:58 [pdm-devel] [PATCH proxmox-yew-widget-toolkit 1/1] data table: fix using str with get_property Stefan Hanreich
2025-08-21  8:46 ` [pdm-devel] applied: " Dominik Csapak

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal