Skip to content

Commit 8d30e10

Browse files
authored
Lint with Clippy (#50)
* Fix pre-existing * Run in CI
1 parent cbf0d0c commit 8d30e10

3 files changed

Lines changed: 6 additions & 2 deletions

File tree

.github/workflows/tests.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,10 @@ jobs:
5959
# side doesn't poison the other's incremental artifacts.
6060
key: rust-tests
6161

62+
# TODO: consider moving to separate job
63+
- name: Lint
64+
uses: clechasseur/rs-clippy-check@1e16925ceec49b64803a6abc5f6bbe79044c3bd4 # v6.0.4
65+
6266
- name: cargo test --workspace
6367
run: cargo test --workspace --locked
6468

livekit-portal/src/data.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -282,6 +282,7 @@ impl Drop for DataPublisher {
282282
/// Push-callback + latest-wins slot for a single typed record (Action or
283283
/// State). Paired so receivers and getters share one allocation.
284284
pub(crate) struct DataSlot<R: Clone> {
285+
#[allow(clippy::type_complexity)]
285286
pub cb: Mutex<Option<Box<dyn Fn(&R) + Send + Sync>>>,
286287
pub latest: Mutex<Option<R>>,
287288
/// Peer fingerprints already reported as mismatched. Logged once per

livekit-portal/src/portal.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ use std::panic::{catch_unwind, AssertUnwindSafe};
33
use std::sync::Arc;
44
use std::time::Duration;
55

6-
use bytes::Bytes;
76
use livekit::prelude::*;
87
use livekit::webrtc::video_stream::native::NativeVideoStream;
98
use parking_lot::Mutex;
@@ -1657,7 +1656,7 @@ fn handle_room_event(ctx: &EventContext, event: RoomEvent) {
16571656
// zero-copy view of the wire payload all the
16581657
// way to `VideoFrameData.data`.
16591658
Ok(payload) => dispatch_frame_payload(
1660-
Bytes::from(payload),
1659+
payload,
16611660
&entries,
16621661
&sync_buffer,
16631662
&obs_sink,

0 commit comments

Comments
 (0)