Skip to content

Commit

Permalink
check: clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
hongcha98 committed Mar 2, 2024
1 parent f46081c commit 5b53180
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
7 changes: 3 additions & 4 deletions src/forward/forward_internal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -224,10 +224,9 @@ impl PeerForwardInternal {
pub(crate) async fn set_publish(&self, peer: Arc<RTCPeerConnection>) -> Result<()> {
let mut publish = self.publish.write().await;
if publish.is_some() {
return Err(AppError::ResourceAlreadyExists(
"A connection has already been established".to_string(),
)
.into());
return Err(AppError::resource_already_exists(
"A connection has already been established",
));
}
let publish_peer = PublishRTCPeerConnection::new(
self.id.clone(),
Expand Down
2 changes: 1 addition & 1 deletion src/forward/subscribe.rs
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ impl SubscribeRTCPeerConnection {

pub(crate) fn select_kind_rid(&self, kind: RTPCodecType, rid: String) -> Result<()> {
if let Err(err) = self.select_layer_sender.send((kind, rid)) {
Err(AppError::Throw(format!("select layer send err: {}", err)))
Err(AppError::throw(format!("select layer send err: {}", err)))
} else {
Ok(())
}
Expand Down

0 comments on commit 5b53180

Please sign in to comment.