From: Stefan Hanreich <s.hanreich@proxmox.com>
To: pdm-devel@lists.proxmox.com
Subject: [pdm-devel] [PATCH proxmox-yew-widget-toolkit 1/1] data table: fix using str with get_property
Date: Wed, 20 Aug 2025 13:58:08 +0200 [thread overview]
Message-ID: <20250820115809.196115-1-s.hanreich@proxmox.com> (raw)
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
next reply other threads:[~2025-08-20 11:56 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-20 11:58 Stefan Hanreich [this message]
2025-08-21 8:46 ` [pdm-devel] applied: " Dominik Csapak
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250820115809.196115-1-s.hanreich@proxmox.com \
--to=s.hanreich@proxmox.com \
--cc=pdm-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox