Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix way too many new clippy lints from Rust 1.66 #693

Merged
merged 1 commit into from
Dec 19, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions av1an-core/src/broker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ impl Debug for StringOrBytes {
f.write_str(s)?;
}
}
Self::Bytes(b) => write!(f, "raw bytes: {:?}", b)?,
Self::Bytes(b) => write!(f, "raw bytes: {b:?}")?,
}

Ok(())
Expand Down Expand Up @@ -96,7 +96,7 @@ impl Display for EncoderCrash {
)?;

if let Some(ffmpeg_pipe_stderr) = &self.ffmpeg_pipe_stderr {
write!(f, "\nffmpeg pipe stderr:\n{:#?}", ffmpeg_pipe_stderr)?;
write!(f, "\nffmpeg pipe stderr:\n{ffmpeg_pipe_stderr:#?}")?;
}

Ok(())
Expand Down Expand Up @@ -287,7 +287,7 @@ impl<'a> Broker<'a> {
},
);

let mut progress_file = File::create(&progress_file).unwrap();
let mut progress_file = File::create(progress_file).unwrap();
progress_file
.write_all(serde_json::to_string(get_done()).unwrap().as_bytes())
.unwrap();
Expand Down
12 changes: 6 additions & 6 deletions av1an-core/src/concat.rs
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,8 @@ pub fn ivf(input: &Path, out: &Path) -> anyhow::Result<()> {
loop {
match demuxer.read_event() {
Ok(event) => match event {
Event::MoreDataNeeded(sz) => panic!("needed more data: {} bytes", sz),
Event::NewStream(s) => panic!("new stream: {:?}", s),
Event::MoreDataNeeded(sz) => panic!("needed more data: {sz} bytes"),
Event::NewStream(s) => panic!("new stream: {s:?}"),
Event::NewPacket(mut packet) => {
if let Some(p) = packet.pos.as_mut() {
last_pos = *p;
Expand Down Expand Up @@ -196,7 +196,7 @@ pub fn mkvmerge(
audio_file.as_deref(),
);

let mut options_json = File::create(&options_path)?;
let mut options_json = File::create(options_path)?;
options_json.write_all(options_json_contents.as_bytes())?;

let mut cmd = Command::new("mkvmerge");
Expand Down Expand Up @@ -228,13 +228,13 @@ pub fn mkvmerge_options_json(
audio: Option<&str>,
) -> String {
let mut file_string = String::with_capacity(64 + 12 * num);
write!(file_string, "[\"-o\", {:?}", output).unwrap();
write!(file_string, "[\"-o\", {output:?}").unwrap();
if let Some(audio) = audio {
write!(file_string, ", {:?}", audio).unwrap();
write!(file_string, ", {audio:?}").unwrap();
}
file_string.push_str(", \"[\"");
for i in 0..num {
write!(file_string, ", \"{:05}.{}\"", i, encoder.output_extension()).unwrap();
write!(file_string, ", \"{i:05}.{}\"", encoder.output_extension()).unwrap();
}
file_string.push_str(",\"]\"]");

Expand Down
Loading