From eff2fab6797f9d29c404998370f59a06a2df34c1 Mon Sep 17 00:00:00 2001 From: Pantonshire Date: Thu, 18 Aug 2022 11:52:28 +0100 Subject: [PATCH] Encoding module --- src/{ => encoding}/hex.rs | 0 src/encoding/mod.rs | 2 ++ src/encoding/rfc3986.rs | 0 src/lib.rs | 2 +- src/uuid.rs | 2 +- 5 files changed, 4 insertions(+), 2 deletions(-) rename src/{ => encoding}/hex.rs (100%) create mode 100644 src/encoding/mod.rs create mode 100644 src/encoding/rfc3986.rs diff --git a/src/hex.rs b/src/encoding/hex.rs similarity index 100% rename from src/hex.rs rename to src/encoding/hex.rs diff --git a/src/encoding/mod.rs b/src/encoding/mod.rs new file mode 100644 index 0000000..44a657e --- /dev/null +++ b/src/encoding/mod.rs @@ -0,0 +1,2 @@ +pub mod hex; +pub mod rfc3986; diff --git a/src/encoding/rfc3986.rs b/src/encoding/rfc3986.rs new file mode 100644 index 0000000..e69de29 diff --git a/src/lib.rs b/src/lib.rs index 7434738..9220636 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -5,6 +5,6 @@ extern crate alloc; pub mod convert; pub mod either; -pub mod hex; +pub mod encoding; pub mod strings; pub mod uuid; diff --git a/src/uuid.rs b/src/uuid.rs index eb7570e..0f67818 100644 --- a/src/uuid.rs +++ b/src/uuid.rs @@ -1,6 +1,6 @@ use core::{fmt, str}; -use crate::{hex, strings::FixedString}; +use crate::{encoding::hex, strings::FixedString}; // TODO: make conformity to RFC 4122 an invariant of this type (which means it cannot be created // safely from an arbitrary [u8; 16]).