From a2f89112e6ab543b82329967f8ef08c9b8e0523b Mon Sep 17 00:00:00 2001 From: DanGould Date: Mon, 6 Jan 2025 23:54:13 -0500 Subject: [PATCH] Make Request impl fns pub(crate) They're only meant to be used internally --- payjoin/src/request.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/payjoin/src/request.rs b/payjoin/src/request.rs index efd8dac5..8dd83f9e 100644 --- a/payjoin/src/request.rs +++ b/payjoin/src/request.rs @@ -27,12 +27,14 @@ pub struct Request { } impl Request { - pub fn new_v1(url: Url, body: Vec) -> Self { + /// Construct a new v1 request. + pub(crate) fn new_v1(url: Url, body: Vec) -> Self { Self { url, content_type: V1_REQ_CONTENT_TYPE, body } } + /// Construct a new v2 request. #[cfg(feature = "v2")] - pub fn new_v2(url: Url, body: [u8; crate::ohttp::ENCAPSULATED_MESSAGE_BYTES]) -> Self { + pub(crate) fn new_v2(url: Url, body: [u8; crate::ohttp::ENCAPSULATED_MESSAGE_BYTES]) -> Self { Self { url, content_type: V2_REQ_CONTENT_TYPE, body: body.to_vec() } } }