Driver: Retune threadpool keepalive time #205
clippy
34 warnings
Details
Results
Message level | Amount |
---|---|
Internal compiler error | 0 |
Error | 0 |
Warning | 34 |
Note | 0 |
Help | 0 |
Versions
- rustc 1.74.0-nightly (8550f15e1 2023-08-27)
- cargo 1.74.0-nightly (925280f02 2023-08-25)
- clippy 0.1.73 (8550f15 2023-08-27)
Annotations
Check warning on line 51 in src/input/metadata/mod.rs
github-actions / clippy
this argument is a mutable reference, but not used mutably
warning: this argument is a mutable reference, but not used mutably
--> src/input/metadata/mod.rs:51:37
|
51 | pub fn from_ffprobe_json(value: &mut [u8]) -> Result<Self, JsonError> {
| ^^^^^^^^^ help: consider changing to: `&[u8]`
|
= warning: changing this function will impact semver compatibility
= note: this is cfg-gated and may require further changes
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_ref_mut
= note: `#[warn(clippy::needless_pass_by_ref_mut)]` on by default
Check warning on line 256 in src/manager.rs
github-actions / clippy
matching over `()` is more explicit
warning: matching over `()` is more explicit
--> src/manager.rs:256:41
|
256 | Ok(chan) => chan.await.map(|_| call),
| ^ help: use `()` instead of `_`: `()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ignored_unit_patterns
Check warning on line 77 in src/input/adapters/raw_adapter.rs
github-actions / clippy
matching over `()` is more explicit
warning: matching over `()` is more explicit
--> src/input/adapters/raw_adapter.rs:77:42
|
77 | self.inner.rewind().map(|_| 0)
| ^ help: use `()` instead of `_`: `()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ignored_unit_patterns
Check warning on line 26 in src/input/adapters/raw_adapter.rs
github-actions / clippy
docs for function which may panic missing `# Panics` section
warning: docs for function which may panic missing `# Panics` section
--> src/input/adapters/raw_adapter.rs:26:5
|
26 | pub fn new(audio_source: A, sample_rate: u32, channel_count: u32) -> Self {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
note: first possible panic found here
--> src/input/adapters/raw_adapter.rs:30:9
|
30 | / write_space
31 | | .write_u32::<LittleEndian>(sample_rate)
32 | | .expect("Prepend buffer is sized to include enough space for sample rate.");
| |_______________________________________________________________________________________^
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_panics_doc
Check warning on line 81 in src/input/adapters/child.rs
github-actions / clippy
matching over `()` is more explicit
warning: matching over `()` is more explicit
--> src/input/adapters/child.rs:81:37
|
81 | let attempt = attempt.and_then(|_| {
| ^ help: use `()` instead of `_`: `()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ignored_unit_patterns
Check warning on line 403 in src/input/adapters/cached/compressed.rs
github-actions / clippy
matching over `()` is more explicit
warning: matching over `()` is more explicit
--> src/input/adapters/cached/compressed.rs:403:24
|
403 | Ok(_) => {
| ^ help: use `()` instead of `_`: `()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ignored_unit_patterns
Check warning on line 132 in src/input/adapters/cached/compressed.rs
github-actions / clippy
docs for function which may panic missing `# Panics` section
warning: docs for function which may panic missing `# Panics` section
--> src/input/adapters/cached/compressed.rs:128:5
|
128 | / pub async fn with_config(
129 | | source: Input,
130 | | bitrate: Bitrate,
131 | | config: Option<Config>,
132 | | ) -> Result<Self, CodecCacheError> {
| |______________________________________^
|
note: first possible panic found here
--> src/input/adapters/cached/compressed.rs:205:9
|
205 | / (&mut metabytes[4..][..mem::size_of::<i32>()])
206 | | .write_i32::<LittleEndian>(meta_len)
207 | | .expect("Magic byte writing location guaranteed to be well-founded.");
| |_________________________________________________________________________________^
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_panics_doc
Check warning on line 305 in src/input/adapters/async_adapter.rs
github-actions / clippy
matching over `()` is more explicit
warning: matching over `()` is more explicit
--> src/input/adapters/async_adapter.rs:305:52
|
305 | None => self.check_dropped().ok().map(|_| unreachable!()),
| ^ help: use `()` instead of `_`: `()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ignored_unit_patterns
Check warning on line 287 in src/input/adapters/async_adapter.rs
github-actions / clippy
matching over `()` is more explicit
warning: matching over `()` is more explicit
--> src/input/adapters/async_adapter.rs:287:47
|
287 | None => self.check_dropped().map(|_| unreachable!()),
| ^ help: use `()` instead of `_`: `()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ignored_unit_patterns
Check warning on line 277 in src/input/adapters/async_adapter.rs
github-actions / clippy
matching over `()` is more explicit
warning: matching over `()` is more explicit
--> src/input/adapters/async_adapter.rs:277:47
|
277 | None => self.check_dropped().map(|_| unreachable!())?,
| ^ help: use `()` instead of `_`: `()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ignored_unit_patterns
Check warning on line 86 in src/input/adapters/async_adapter.rs
github-actions / clippy
matching over `()` is more explicit
warning: matching over `()` is more explicit
--> src/input/adapters/async_adapter.rs:86:70
|
86 | fs.push(Either::Right(self.notify_rx.notified().map(|_| {
| ^ help: use `()` instead of `_`: `()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ignored_unit_patterns
Check warning on line 157 in src/info.rs
github-actions / clippy
manual `Debug` impl does not include all fields
warning: manual `Debug` impl does not include all fields
--> src/info.rs:148:1
|
148 | / impl fmt::Debug for Partial {
149 | | fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
150 | | f.debug_struct("Partial")
151 | | .field("channel_id", &self.channel_id)
... |
156 | | }
157 | | }
| |_^
|
note: this field is unused
--> src/info.rs:142:5
|
142 | pub guild_id: GuildId,
| ^^^^^^^^^^^^^^^^^^^^^
note: this field is unused
--> src/info.rs:145:5
|
145 | pub user_id: UserId,
| ^^^^^^^^^^^^^^^^^^^
= help: consider including all fields in this `Debug` impl
= help: consider calling `.finish_non_exhaustive()` if you intend to ignore fields
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_fields_in_debug
= note: `#[warn(clippy::missing_fields_in_debug)]` implied by `#[warn(clippy::pedantic)]`
Check warning on line 307 in src/handler.rs
github-actions / clippy
matching over `()` is more explicit
warning: matching over `()` is more explicit
--> src/handler.rs:307:23
|
307 | .map(|_| JoinGateway::new(rx.into_recv_async(), timeout))
| ^ help: use `()` instead of `_`: `()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ignored_unit_patterns
Check warning on line 244 in src/handler.rs
github-actions / clippy
matching over `()` is more explicit
warning: matching over `()` is more explicit
--> src/handler.rs:244:23
|
244 | .map(|_| Join::new(rx.into_recv_async(), gw_rx.into_recv_async(), timeout))
| ^ help: use `()` instead of `_`: `()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ignored_unit_patterns
Check warning on line 173 in src/events/store.rs
github-actions / clippy
use of `or_insert_with` to construct default value
warning: use of `or_insert_with` to construct default value
--> src/events/store.rs:173:52
|
173 | let holder = self.awaiting_tick.entry(evt).or_insert_with(Vec::new);
| ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `or_default()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default
Check warning on line 68 in src/events/store.rs
github-actions / clippy
use of `or_insert_with` to construct default value
warning: use of `or_insert_with` to construct default value
--> src/events/store.rs:68:22
|
68 | .or_insert_with(Vec::new)
| ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `or_default()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default
Check warning on line 62 in src/events/store.rs
github-actions / clippy
use of `or_insert_with` to construct default value
warning: use of `or_insert_with` to construct default value
--> src/events/store.rs:62:22
|
62 | .or_insert_with(Vec::new)
| ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `or_default()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default
= note: `#[warn(clippy::unwrap_or_default)]` on by default
Check warning on line 26 in src/events/context/data/rtp.rs
github-actions / clippy
docs for function which may panic missing `# Panics` section
warning: docs for function which may panic missing `# Panics` section
--> src/events/context/data/rtp.rs:26:5
|
26 | pub fn rtp(&'_ self) -> RtpPacket<'_> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
note: first possible panic found here
--> src/events/context/data/rtp.rs:27:9
|
27 | / RtpPacket::new(&self.packet)
28 | | .expect("FATAL: leaked illegally small RTP packet from UDP Rx task.")
| |_________________________________________________________________________________^
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_panics_doc
Check warning on line 24 in src/events/context/data/rtcp.rs
github-actions / clippy
docs for function which may panic missing `# Panics` section
warning: docs for function which may panic missing `# Panics` section
--> src/events/context/data/rtcp.rs:24:5
|
24 | pub fn rtcp(&'_ self) -> RtcpPacket<'_> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
note: first possible panic found here
--> src/events/context/data/rtcp.rs:25:9
|
25 | / RtcpPacket::new(&self.packet)
26 | | .expect("FATAL: leaked illegally small RTP packet from UDP Rx task.")
| |_________________________________________________________________________________^
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_panics_doc
Check warning on line 313 in src/driver/mod.rs
github-actions / clippy
docs for function which may panic missing `# Panics` section
warning: docs for function which may panic missing `# Panics` section
--> src/driver/mod.rs:309:5
|
309 | / pub fn enqueue_with_preload(
310 | | &mut self,
311 | | track: Track,
312 | | preload_time: Option<Duration>,
313 | | ) -> TrackHandle {
| |____________________^
|
note: first possible panic found here
--> src/driver/mod.rs:314:21
|
314 | let queue = self.queue.take().expect(
| _____________________^
315 | | "Enqueue: The only case this can fail is if a previous queue operation panicked.",
316 | | );
| |_________^
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_panics_doc
Check warning on line 283 in src/driver/mod.rs
github-actions / clippy
docs for function which may panic missing `# Panics` section
warning: docs for function which may panic missing `# Panics` section
--> src/driver/mod.rs:283:5
|
283 | pub fn queue(&self) -> &TrackQueue {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
note: first possible panic found here
--> src/driver/mod.rs:284:9
|
284 | / self.queue
285 | | .as_ref()
286 | | .expect("Queue: The only case this can fail is if a previous queue operation panicked.")
| |____________________________________________________________________________________________________^
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_panics_doc
= note: `#[warn(clippy::missing_panics_doc)]` implied by `#[warn(clippy::pedantic)]`
Check warning on line 85 in src/driver/tasks/ws.rs
github-actions / clippy
matching over `()` is more explicit
warning: matching over `()` is more explicit
--> src/driver/tasks/ws.rs:85:17
|
85 | _ = hb => {
| ^ help: use `()` instead of `_`: `()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ignored_unit_patterns
Check warning on line 100 in src/driver/tasks/udp_rx/mod.rs
github-actions / clippy
matching over `()` is more explicit
warning: matching over `()` is more explicit
--> src/driver/tasks/udp_rx/mod.rs:100:17
|
100 | _ = tokio::time::sleep_until(cleanup_time) => {
| ^ help: use `()` instead of `_`: `()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ignored_unit_patterns
Check warning on line 73 in src/driver/tasks/udp_rx/mod.rs
github-actions / clippy
matching over `()` is more explicit
warning: matching over `()` is more explicit
--> src/driver/tasks/udp_rx/mod.rs:73:17
|
73 | _ = tokio::time::sleep_until(playout_time) => {
| ^ help: use `()` instead of `_`: `()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ignored_unit_patterns
Check warning on line 379 in src/driver/tasks/mixer/mix_logic.rs
github-actions / clippy
it is more concise to loop over references to containers instead of using explicit iteration methods
warning: it is more concise to loop over references to containers instead of using explicit iteration methods
--> src/driver/tasks/mixer/mix_logic.rs:379:24
|
379 | for s_plane in source[..].iter() {
| ^^^^^^^^^^^^^^^^^ help: to write this more concisely, try: `&source[..]`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_iter_loop