chore: Derive std::marker::ConstParamTy for types used as const params

main
Nick Zana 1 year ago
parent 2e6e890c52
commit 2bcc0699f1

@ -1,7 +1,9 @@
#[cfg(feature = "serde")] #[cfg(feature = "serde")]
use serde::{Deserialize, Serialize}; use serde::{Deserialize, Serialize};
#[derive(Clone, Copy, PartialEq, Eq, Hash, Debug)] use std::marker::ConstParamTy;
#[derive(Clone, Copy, PartialEq, Eq, Hash, Debug, ConstParamTy)]
#[cfg_attr( #[cfg_attr(
feature = "serde", feature = "serde",
derive(Serialize, Deserialize), derive(Serialize, Deserialize),

@ -1,10 +1,11 @@
use crate::token; use crate::token;
use std::marker::ConstParamTy;
#[cfg(feature = "serde")] #[cfg(feature = "serde")]
use serde::{Deserialize, Serialize}; use serde::{Deserialize, Serialize};
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[derive(PartialEq, Eq, Clone, Copy)] #[derive(PartialEq, Eq, Clone, Copy, ConstParamTy)]
pub enum DataType { pub enum DataType {
#[cfg_attr(feature = "serde", serde(rename = "webauthn.create"))] #[cfg_attr(feature = "serde", serde(rename = "webauthn.create"))]
Create, Create,

Loading…
Cancel
Save