Skip to content

Commit

Permalink
Remove ord derives and update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
augustuswm committed Nov 20, 2024
1 parent 45a8833 commit 036693b
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions v-api-permission-derive/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ syn = { workspace = true, features = ["derive", "extra-traits", "parsing"] }
newtype-uuid = { workspace = true }
schemars = { workspace = true }
serde = { workspace = true, features = ["derive"] }
serde_json = { workspace = true }
uuid = { workspace = true }
v-api = { path = "../v-api" }
v-model = { path = "../v-model" }
4 changes: 2 additions & 2 deletions v-api-permission-derive/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ pub fn v_api(attr: TokenStream, input: TokenStream) -> TokenStream {

// TODO: Inspect existing derive and add only the missing derive attributes
// #[derive(
// Debug, Clone, PartialEq, Eq, Hash, serde::Serialize, serde::Deserialize, schemars::JsonSchema, PartialOrd, Ord,
// Debug, Clone, PartialEq, Eq, Hash, serde::Serialize, serde::Deserialize, schemars::JsonSchema,
// )]

quote! {
Expand Down Expand Up @@ -441,7 +441,7 @@ fn from_system_permission_tokens(
VPermission::ManageMagicLinkClientsAll => Self::ManageMagicLinkClientsAll,

VPermission::CreateAccessToken => Self::CreateAccessToken,
VPermission::Removed => Self::Removed,
VPermission::Unsupported(inner) => Self::Unsupported(inner),
}
}
}
Expand Down
2 changes: 0 additions & 2 deletions v-api-permission-derive/tests/derive.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ fn test_derive() {
serde::Serialize,
serde::Deserialize,
schemars::JsonSchema,
PartialOrd,
Ord,
)]
enum AppPermissions {
#[v_api(contract(kind = append, variant = CreateItems))]
Expand Down
2 changes: 1 addition & 1 deletion v-api/src/permissions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ impl<T> VAppPermissionResponse for T where T: Permission {}
#[v_api(From(VPermission))]
#[partial(VPermissionResponse, attributes(#[serde(tag = "kind", content = "value")]))]
#[derive(
Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize, JsonSchema, PartialOrd, Ord,
Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize, JsonSchema
)]
pub enum VPermission {}
2 changes: 1 addition & 1 deletion v-api/tests/import.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use v_api_permission_derive::v_api;

#[v_api(From(VPermission))]
#[derive(
Debug, Clone, Hash, PartialEq, Eq, PartialOrd, Ord, Deserialize, Serialize, JsonSchema,
Debug, Clone, Hash, PartialEq, Eq, Deserialize, Serialize, JsonSchema,
)]
enum Permissions {
None,
Expand Down

0 comments on commit 036693b

Please sign in to comment.