Skip to content
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

Improve serialization #558

Merged
merged 5 commits into from
Jan 23, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Serialize flags as camelCase
  • Loading branch information
dfaust committed Jan 21, 2024
commit 626c849ae7486a4d0d51c99d75d0e7d2c5d4c720
1 change: 1 addition & 0 deletions notify/src/event.rs
Original file line number Diff line number Diff line change
Expand Up @@ -484,6 +484,7 @@ impl EventAttributes {
/// particular ways.
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
#[cfg_attr(feature = "serde", derive(Deserialize, Serialize))]
#[cfg_attr(feature = "serde", serde(rename_all = "camelCase"))]
pub enum Flag {
/// Rescan notices are emitted by some platforms (and may also be emitted by Notify itself).
/// They indicate either a lapse in the events or a change in the filesystem such that events
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
source: notify/src/event.rs
assertion_line: 694
expression: json
---
{"type":"any","paths":[],"attrs":{"tracker":123,"flag":"Rescan","info":"test event"}}
{"type":"any","paths":[],"attrs":{"tracker":123,"flag":"rescan","info":"test event"}}