-
Notifications
You must be signed in to change notification settings - Fork 58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update wiring 0.2.0 #79
Conversation
src/datasets/log/mod.rs
Outdated
@@ -22,7 +22,7 @@ use rand::Rng; | |||
#[cfg(feature = "rkyv")] | |||
use rkyv::Archived; | |||
#[cfg(feature = "wiring")] | |||
use wiring::prelude::{Unwiring, Wiring}; | |||
use wiring::prelude::{concat_end, concat_mid, concat_start, Unwiring, Wiring}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These concat_*
includes aren't necessary since they're attributes available to your derive. It should still compile fine if you remove them (but keep the conditional attributes on the fields).
src/bench_wiring.rs
Outdated
let mut wire: Vec<u8> = Vec::new(); | ||
wire.reserve(BUFFER_LEN); // Optional |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let mut wire: Vec<u8> = Vec::new(); | |
wire.reserve(BUFFER_LEN); // Optional | |
let mut wire = Vec::<u8>::with_capacity(BUFFER_LEN); |
src/datasets/mesh/mod.rs
Outdated
@@ -61,8 +61,11 @@ use crate::Generate; | |||
#[cfg_attr(feature = "nanoserde", derive(nanoserde::SerBin, nanoserde::DeBin))] | |||
#[cfg_attr(feature = "wiring", derive(Wiring, Unwiring))] | |||
pub struct Vector3 { | |||
#[cfg_attr(feature = "wiring", concat_start)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nonblocking] Suggestion: a concat_all
attribute on the type could be a nice way to tidy some of these structs up.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed, the ultimate plan to remove them all by making derive macro smarter.
Please put this merge on hold, I will see if I can tackle it tomorrow or during the weekend.
I have implemented the recommended modifications. Kindly review and inform me if there are any omissions or if additional adjustments are desired. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Hi David,
The new wiring 0.2 is huge milestone. ~ 10x improvement.