default table row renderer bug?
zoakes opened this issue · 5 comments
I'm new to the repo, but struggling to get (most) of the examples to run.
The exception so far is the custom_renderer_svg, which uses an overriden renderer.
This is a bit beyond my familiarity to diagnose, but it seems like it just needs a Clone requirement, or a slight deviation in the DefaultTableRowRenderer impl. At a glance it doesn't seem to be missing Clones anywhere, unsure.
Here is the error I seem to get in most other examples:
error[E0283]: type annotations needed
--> src/main.rs:12:10
|
12 | #[derive(TableComponent, Serialize, Deserialize, Debug, Clone, Default, PartialEq)]
| ^^^^^^^^^^^^^^ cannot infer type
|
= note: cannot satisfy `_: Clone`
note: required by a bound in `leptos_struct_table::DefaultTableRowRenderer`
--> /Users/zoakes/RustroverProjects/leptos-struct-table/src/components/row.rs:39:9
|
18 | pub fn DefaultTableRowRenderer<K, F, RV>(
| ----------------------- required by a bound in this function
...
39 | RV: Clone + Default + 'static,
| ^^^^^ required by this bound in `DefaultTableRowRenderer`
= note: this error originates in the derive macro `TableComponent` (in Nightly builds, run with -Z macro-backtrace for more info)
For more information about this error, try `rustc --explain E0283`.
error: could not compile `generic` (bin "generic") due to 1 previous error
What version are you using?
cloned repo -- Master branch, latest.
WRT Rust, 1.78 nightly
➜ custom_renderers_svg git:(master) ✗ cargo --version
cargo 1.78.0-nightly (7bb7b5395 2024-01-20)
➜ custom_renderers_svg git:(master) ✗ rustup --version
rustup 1.26.0 (5af9b9484 2023-04-05)
info: This is the version for the rustup toolchain manager, not the rustc compiler.
info: The currently active rustc
version is rustc 1.78.0-nightly (b11fbfbf3 2024-02-03)
➜ custom_renderers_svg git:(master) ✗ rustc --version
rustc 1.78.0-nightly (b11fbfbf3 2024-02-03)
I realized if I go back to the release 0.6 commit, and run -- seems to be fine.
Unsure of how Master is treated wrt convention in this repo.
So, I can certainly fork off there if needed, or download the release version.
Yeah using the release would be my recommendation. I'm in the final stages of a major refactoring so master is not necessarily stable right now. Will release soon!