Chore: Rust 1.72.0 Clippy lints, adjust MSRV
MSRV was bumped by serenity-next, and so we too must follow suit.
This commit is contained in:
@@ -49,6 +49,7 @@ use symphonia_core::{
|
||||
};
|
||||
use tracing::{debug, trace};
|
||||
|
||||
/// Configuration for a cached source.
|
||||
pub struct Config {
|
||||
/// Registry of audio codecs supported by the driver.
|
||||
///
|
||||
@@ -81,6 +82,9 @@ impl Default for Config {
|
||||
}
|
||||
|
||||
impl Config {
|
||||
/// Generate a storage configuration given an estimated storage bitrate
|
||||
/// `cost_per_sec` in bytes/s.
|
||||
#[must_use]
|
||||
pub fn default_from_cost(cost_per_sec: usize) -> Self {
|
||||
let streamcatcher = default_config(cost_per_sec);
|
||||
Self {
|
||||
|
||||
@@ -15,7 +15,7 @@ use crate::constants::*;
|
||||
use crate::input::utils;
|
||||
use audiopus::Bitrate;
|
||||
use std::{mem, time::Duration};
|
||||
use streamcatcher::{Config, GrowthStrategy};
|
||||
use streamcatcher::{Config as ScConfig, GrowthStrategy};
|
||||
|
||||
/// Estimates the cost, in B/s, of audio data compressed at the given bitrate.
|
||||
#[must_use]
|
||||
@@ -44,6 +44,6 @@ pub fn raw_cost_per_sec(stereo: bool) -> usize {
|
||||
///
|
||||
/// [`streamcatcher`]: https://docs.rs/streamcatcher/0.1.0/streamcatcher/struct.Config.html
|
||||
#[must_use]
|
||||
pub fn default_config(cost_per_sec: usize) -> Config {
|
||||
Config::new().chunk_size(GrowthStrategy::Constant(5 * cost_per_sec))
|
||||
pub fn default_config(cost_per_sec: usize) -> ScConfig {
|
||||
ScConfig::new().chunk_size(GrowthStrategy::Constant(5 * cost_per_sec))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user