Skip to content

Commit

Permalink
Input: Rename YTDL error variants for Clippy (#55)
Browse files Browse the repository at this point in the history
This silences a clippy lint around incorrect capitalisation of acronyms, but sis a breaking API change.

This was tested using `cargo make ready`.
  • Loading branch information
FelixMcFelix committed May 10, 2021
1 parent e7af0ff commit 3c7f86d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/input/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,13 @@ pub enum Error {
/// An error occurred while processing the JSON output from `youtube-dl`.
///
/// The JSON output is given.
YouTubeDLProcessing(Value),
YouTubeDlProcessing(Value),
/// An error occurred while running `youtube-dl`.
YouTubeDLRun(Output),
YouTubeDlRun(Output),
/// The `url` field of the `youtube-dl` JSON output was not present.
///
/// The JSON output is given.
YouTubeDLUrl(Value),
YouTubeDlUrl(Value),
}

impl From<CatcherError> for Error {
Expand Down
4 changes: 2 additions & 2 deletions src/input/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ impl Input {
}

// read from frame which is present.
let mut buffer = &mut buffer[..];
let mut buffer = buffer;

let start = decoder_state.frame_pos;
let to_write = float_space.min(decoder_state.current_frame.len() - start);
Expand All @@ -261,7 +261,7 @@ impl Input {
}
},
Codec::Pcm => {
let mut buffer = &mut buffer[..];
let mut buffer = buffer;
while written_floats < float_space {
if let Ok(signal) = self.reader.read_i16::<LittleEndian>() {
buffer.write_f32::<LittleEndian>(f32::from(signal) / 32768.0)?;
Expand Down

0 comments on commit 3c7f86d

Please sign in to comment.