From 2718d82dde3848e78e7529e511e9054a9ee7ae15 Mon Sep 17 00:00:00 2001 From: Marshall Quander Date: Thu, 28 Sep 2017 03:12:29 -0700 Subject: [PATCH] Use macro for answer_sdp, formatting --- rustfmt.toml | 2 ++ src/lib.rs | 6 ++---- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/rustfmt.toml b/rustfmt.toml index bfefee7..e43cc23 100644 --- a/rustfmt.toml +++ b/rustfmt.toml @@ -1,2 +1,4 @@ max_width = 140 fn_call_width = 100 +reorder_imports = true +reorder_imported_names = true diff --git a/src/lib.rs b/src/lib.rs index 4160e49..13fe38a 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,9 +1,7 @@ #[macro_use] extern crate cstr_macro; - #[macro_use] extern crate lazy_static; - #[macro_use] extern crate janus_plugin as janus; extern crate jansson_sys as jansson; @@ -203,8 +201,8 @@ extern "C" fn handle_message( } else { let offer_str = unsafe { CString::from_raw(sdp_val as *mut _) }; janus::log(LogLevel::Info, &format!("Received SDP offer: {}", offer_str.to_str().unwrap())); - let offer = janus::sdp::parse_sdp(offer_str, 512).unwrap(); - let answer = janus::sdp::answer_sdp(&offer); + let offer = janus::sdp::parse_sdp(offer_str).unwrap(); + let answer = answer_sdp!(&offer); let answer_str = janus::sdp::write_sdp(&answer); unsafe { let jsep = jansson::json_object();