cargo fmt

This commit is contained in:
JoshuaBatty 2020-05-05 16:31:51 +02:00
parent 919722a785
commit 7eb45bca6f
1 changed files with 6 additions and 2 deletions

View File

@ -525,7 +525,11 @@ impl SupportedStreamConfigRange {
///
/// **panic!**s if the given `sample_rate` or the give `buffer_size` is outside the range specified within this
/// `SupportedStreamConfigRange` instance.
pub fn with_sample_rate_and_buffer_size(self, sample_rate: SampleRate, buffer_size: BufferSize) -> SupportedStreamConfig {
pub fn with_sample_rate_and_buffer_size(
self,
sample_rate: SampleRate,
buffer_size: BufferSize,
) -> SupportedStreamConfig {
assert!(self.min_sample_rate <= sample_rate && sample_rate <= self.max_sample_rate);
assert!(self.buffer_size.min <= buffer_size && buffer_size <= self.buffer_size.max);
if self.buffer_size.requires_power_of_two {
@ -533,9 +537,9 @@ impl SupportedStreamConfigRange {
}
SupportedStreamConfig {
channels: self.channels,
sample_rate: self.max_sample_rate,
sample_format: self.sample_format,
buffer_size,
sample_rate: self.max_sample_rate,
}
}