From a2ae49f9536d6a7aa890c628f6fa29f32c322070 Mon Sep 17 00:00:00 2001 From: Anton Kaliaev Date: Mon, 5 Sep 2022 11:59:42 +0400 Subject: [PATCH] sdp: move pub functions up --- transports/webrtc/src/sdp.rs | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/transports/webrtc/src/sdp.rs b/transports/webrtc/src/sdp.rs index 5a41ddea961..ad69d04d166 100644 --- a/transports/webrtc/src/sdp.rs +++ b/transports/webrtc/src/sdp.rs @@ -26,6 +26,22 @@ use std::net::IpAddr; use crate::fingerprint::Fingerprint; +pub(crate) fn render_server_session_description( + addr: SocketAddr, + fingerprint: &Fingerprint, + ufrag: &str, +) -> String { + render_description(SERVER_SESSION_DESCRIPTION, addr, fingerprint, ufrag) +} + +pub(crate) fn render_client_session_description( + addr: SocketAddr, + fingerprint: &Fingerprint, + ufrag: &str, +) -> String { + render_description(CLIENT_SESSION_DESCRIPTION, addr, fingerprint, ufrag) +} + // An SDP message that constitutes the offer. // // Main RFC: @@ -189,22 +205,6 @@ struct DescriptionContext { pub pwd: String, } -pub(crate) fn render_server_session_description( - addr: SocketAddr, - fingerprint: &Fingerprint, - ufrag: &str, -) -> String { - render_description(SERVER_SESSION_DESCRIPTION, addr, fingerprint, ufrag) -} - -pub(crate) fn render_client_session_description( - addr: SocketAddr, - fingerprint: &Fingerprint, - ufrag: &str, -) -> String { - render_description(CLIENT_SESSION_DESCRIPTION, addr, fingerprint, ufrag) -} - /// Renders a [`TinyTemplate`] description using the provided arguments. fn render_description( description: &str,