Input: Rename YTDL error variants for Clippy (#55)
This silences a clippy lint around incorrect capitalisation of acronyms, but sis a breaking API change. This was tested using `cargo make ready`.
This commit is contained in:
@@ -35,13 +35,13 @@ pub enum Error {
|
|||||||
/// An error occurred while processing the JSON output from `youtube-dl`.
|
/// An error occurred while processing the JSON output from `youtube-dl`.
|
||||||
///
|
///
|
||||||
/// The JSON output is given.
|
/// The JSON output is given.
|
||||||
YouTubeDLProcessing(Value),
|
YouTubeDlProcessing(Value),
|
||||||
/// An error occurred while running `youtube-dl`.
|
/// An error occurred while running `youtube-dl`.
|
||||||
YouTubeDLRun(Output),
|
YouTubeDlRun(Output),
|
||||||
/// The `url` field of the `youtube-dl` JSON output was not present.
|
/// The `url` field of the `youtube-dl` JSON output was not present.
|
||||||
///
|
///
|
||||||
/// The JSON output is given.
|
/// The JSON output is given.
|
||||||
YouTubeDLUrl(Value),
|
YouTubeDlUrl(Value),
|
||||||
}
|
}
|
||||||
|
|
||||||
impl From<CatcherError> for Error {
|
impl From<CatcherError> for Error {
|
||||||
|
|||||||
@@ -247,7 +247,7 @@ impl Input {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// read from frame which is present.
|
// read from frame which is present.
|
||||||
let mut buffer = &mut buffer[..];
|
let mut buffer = buffer;
|
||||||
|
|
||||||
let start = decoder_state.frame_pos;
|
let start = decoder_state.frame_pos;
|
||||||
let to_write = float_space.min(decoder_state.current_frame.len() - start);
|
let to_write = float_space.min(decoder_state.current_frame.len() - start);
|
||||||
@@ -261,7 +261,7 @@ impl Input {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
Codec::Pcm => {
|
Codec::Pcm => {
|
||||||
let mut buffer = &mut buffer[..];
|
let mut buffer = buffer;
|
||||||
while written_floats < float_space {
|
while written_floats < float_space {
|
||||||
if let Ok(signal) = self.reader.read_i16::<LittleEndian>() {
|
if let Ok(signal) = self.reader.read_i16::<LittleEndian>() {
|
||||||
buffer.write_f32::<LittleEndian>(f32::from(signal) / 32768.0)?;
|
buffer.write_f32::<LittleEndian>(f32::from(signal) / 32768.0)?;
|
||||||
|
|||||||
Reference in New Issue
Block a user