Skip to content

Commit

Permalink
Add appropriate derivations
Browse files Browse the repository at this point in the history
  • Loading branch information
TTWNO committed Mar 9, 2024
1 parent 7b4a686 commit f49f940
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 3 deletions.
2 changes: 1 addition & 1 deletion odilia-notify/src/action.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use serde::{Deserialize, Serialize};

#[derive(Debug, Serialize, Deserialize)]
#[derive(Debug, Serialize, Deserialize, PartialEq, Eq)]

Check warning on line 3 in odilia-notify/src/action.rs

View check run for this annotation

Codecov / codecov/patch

odilia-notify/src/action.rs#L3

Added line #L3 was not covered by tests
pub struct Action {
pub name: String,
pub method: String,
Expand Down
2 changes: 1 addition & 1 deletion odilia-notify/src/notification.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use crate::action::Action;
use crate::urgency::Urgency;
use itertools::Itertools;

#[derive(Debug, Serialize, Deserialize)]
#[derive(Debug, Serialize, Deserialize, PartialEq, Eq)]

Check warning on line 11 in odilia-notify/src/notification.rs

View check run for this annotation

Codecov / codecov/patch

odilia-notify/src/notification.rs#L11

Added line #L11 was not covered by tests
pub struct Notification {
pub app_name: String,
pub title: String,
Expand Down
16 changes: 15 additions & 1 deletion odilia-notify/src/urgency.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,21 @@ use zbus::zvariant::{OwnedValue, Type, Value};

/// A priority/urgency level.
/// https://specifications.freedesktop.org/notification-spec/notification-spec-latest.html#urgency-levels
#[derive(Clone, Copy, Debug, Type, Serialize, Deserialize, Default, Value, OwnedValue)]
#[derive(
Clone,

Check warning on line 7 in odilia-notify/src/urgency.rs

View check run for this annotation

Codecov / codecov/patch

odilia-notify/src/urgency.rs#L7

Added line #L7 was not covered by tests
Copy,
Debug,
Type,
Serialize,
Deserialize,
Default,
Value,
OwnedValue,

Check warning on line 15 in odilia-notify/src/urgency.rs

View check run for this annotation

Codecov / codecov/patch

odilia-notify/src/urgency.rs#L9-L15

Added lines #L9 - L15 were not covered by tests
Eq,
PartialEq,
PartialOrd,
Ord,

Check warning on line 19 in odilia-notify/src/urgency.rs

View check run for this annotation

Codecov / codecov/patch

odilia-notify/src/urgency.rs#L17-L19

Added lines #L17 - L19 were not covered by tests
)]
#[zvariant(signature = "y")]
#[repr(u8)]
pub enum Urgency {
Expand Down

0 comments on commit f49f940

Please sign in to comment.