From b0977f970340ccce42447a5cccf483fadfc09515 Mon Sep 17 00:00:00 2001 From: Rasmus Melchior Jacobsen Date: Mon, 30 Jan 2023 12:24:07 +0100 Subject: [PATCH] Add defmt feature --- Cargo.toml | 1 + src/lib.rs | 1 + 2 files changed, 2 insertions(+) diff --git a/Cargo.toml b/Cargo.toml index 527505c..4c6e0ce 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,3 +11,4 @@ keywords = ["embedded", "url", "no_std"] exclude = [".github"] [dependencies] +defmt = { version = "0.3", optional = true } \ No newline at end of file diff --git a/src/lib.rs b/src/lib.rs index 9a51da0..7210025 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -12,6 +12,7 @@ pub struct Url<'a> { } #[derive(PartialEq, Eq, Clone, Copy, Debug)] +#[cfg_attr(feature = "defmt", derive(defmt::Format))] pub enum UrlScheme { /// HTTP scheme HTTP,