Wulf / dsync

Generate rust structs & query functions from diesel schema files
Other
70 stars 13 forks source link

Derive PartialEq for Update structs #118

Closed longsleep closed 11 months ago

longsleep commented 11 months ago

To allow easy checks for "empty" updates, this change adds the PartialEq derive to the generated Update structs. This allows comparison with Default::default() to check if an update is empty.

Fixes: https://github.com/Wulf/dsync/issues/117

longsleep commented 11 months ago

you will need to run ./test/test_all.sh and commit the changes if they look correct

Sorry forgot about that - done now and also rebased.

longsleep commented 11 months ago

change looks good to me, only really missing a entry in the CHANGELOG (forgot to include this in my message before)

OK this is a bit strange to require changes of the CHANGELOG with the merge request. That will conflict pretty much every time then. Normally the CHANGELOG is updated in regular intervals for releases and I do not see a point in having "unreleased" changes in the CHANGELOG (after all there is git to see those). Just my two cents on this - I will happily update the changelog in a dedicated commit if that makes things easier for you. Just let me know.

hasezoey commented 11 months ago

OK this is a bit strange to require changes of the CHANGELOG with the merge request. That will conflict pretty much every time then.

this is normally true, but we (at least currently) dont have automated releases and later guessing on what something changed is not the best option, including forgetting to entry a change at all.

also currently every PR basically conflicts with every other PR because of the generated tests already.