From eba5477fde12462b8252eddb8119e8373a4c1cda Mon Sep 17 00:00:00 2001 From: Clement Delafargue Date: Mon, 13 Jan 2025 15:51:37 +0100 Subject: [PATCH] implement Default for Algorithm ed25519 is used as the default algorithm in a lot of places --- biscuit-auth/src/token/builder/algorithm.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/biscuit-auth/src/token/builder/algorithm.rs b/biscuit-auth/src/token/builder/algorithm.rs index 08455fc6..018e6959 100644 --- a/biscuit-auth/src/token/builder/algorithm.rs +++ b/biscuit-auth/src/token/builder/algorithm.rs @@ -12,6 +12,12 @@ pub enum Algorithm { Secp256r1, } +impl Default for Algorithm { + fn default() -> Self { + Self::Ed25519 + } +} + impl Display for Algorithm { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self {