Closed elenakrittik closed 5 months ago
Hi @elenakrittik Thanks for bringing it up.
tabled only says that it requires types to be Display
True
If what you're saying is true; then it must be considered a bug. (I very much believe it's the case)
Don't you wanna fix it yourself? (Just asking in case you're interested to) It shall be a small fix down here, and a few tests.
https://github.com/zhiburt/tabled/blob/fa06ecfb180649fef55141cae8dfd8db11a8a2c5/tabled_derive/src/lib.rs#L448 https://github.com/zhiburt/tabled/blob/fa06ecfb180649fef55141cae8dfd8db11a8a2c5/tabled_derive/src/lib.rs#L392
Interesting....
Thanks once again. Let me know if you'll have time.
Don't you wanna fix it yourself? (Just asking in case you're interested to) It shall be a small fix down here, and a few tests.
I would be glad to help, but i'm not sure i understand the "real" issue here. I tried playing around with the lines you've mentioned (removing Cow
, forcing Cow::Borrowed
or Cow::Owned
) but in every case the change broke tests and/or examples. I also noticed that Cow
is mandatory because the Tabled
trait itself mandates return types to be Vec<Cow<...>>
. If "fixing" this will get too much into the core of tabled
, maybe this should just be documented instead?
The following example results in an error spelled out in the title:
tabled
only says that it requires types to beDisplay
, but here is it also trying to construct aCow
of something from thatDisplay
impl.