cargo check fix
This commit is contained in:
parent
dc615dbc57
commit
b1987ec963
@ -23,7 +23,11 @@ pub async fn run(opts: Opts, is_info: bool) -> Result<(), Error> {
|
||||
r
|
||||
}
|
||||
|
||||
async fn run_inner(opts: Opts, session_group: Arc<SessionGroup>, is_info: bool) -> Result<(), Error> {
|
||||
async fn run_inner(
|
||||
opts: Opts,
|
||||
session_group: Arc<SessionGroup>,
|
||||
is_info: bool,
|
||||
) -> Result<(), Error> {
|
||||
let stop = tokio::signal::ctrl_c();
|
||||
|
||||
let creds = super::creds(opts.src.username, opts.src.password);
|
||||
|
@ -25,8 +25,8 @@ use url::Url;
|
||||
|
||||
use crate::client::parse::SessionHeader;
|
||||
use crate::codec::CodecItem;
|
||||
use crate::{Error, ErrorInt, RtspMessageContext};
|
||||
use crate::fmt_option;
|
||||
use crate::{Error, ErrorInt, RtspMessageContext};
|
||||
|
||||
mod channel_mapping;
|
||||
mod parse;
|
||||
@ -598,7 +598,8 @@ pub struct Stream {
|
||||
impl std::fmt::Display for Stream {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||
let udp: String = match &self.sockets {
|
||||
Some(x) => format!(concat!(
|
||||
Some(x) => format!(
|
||||
concat!(
|
||||
"\n",
|
||||
" local ip: {}\n",
|
||||
" local port: {}\n",
|
||||
@ -610,10 +611,13 @@ impl std::fmt::Display for Stream {
|
||||
&x.local_rtp_port,
|
||||
&x.remote_ip,
|
||||
&x.remote_rtp_port,
|
||||
&x.remote_rtcp_port),
|
||||
&x.remote_rtcp_port
|
||||
),
|
||||
None => "None".to_string(),
|
||||
};
|
||||
write!(f, concat!(
|
||||
write!(
|
||||
f,
|
||||
concat!(
|
||||
"Stream:\n",
|
||||
" media: {}\n",
|
||||
" url: {}\n",
|
||||
|
@ -62,7 +62,10 @@ struct ReceivedMessage {
|
||||
msg: Message<Bytes>,
|
||||
}
|
||||
|
||||
pub fn fmt_option<T>(opt: &Option<T>) -> String where T: std::fmt::Display {
|
||||
pub fn fmt_option<T>(opt: &Option<T>) -> String
|
||||
where
|
||||
T: std::fmt::Display,
|
||||
{
|
||||
match opt {
|
||||
Some(x) => x.to_string(),
|
||||
None => "None".to_string(),
|
||||
|
Loading…
Reference in New Issue
Block a user