clippy: Avoid making unnecessary references

This commit is contained in:
Ian Hobson
2023-05-12 16:52:06 +02:00
parent 566ad07247
commit 651009c96a
3 changed files with 10 additions and 12 deletions

View File

@@ -298,7 +298,7 @@ fn convert_to_cue_string(buffer: &[u8]) -> String {
fn convert_from_cue_string(val: &str) -> Vec<u8> {
ASCII
.encode(&val, EncoderTrap::Ignore)
.encode(val, EncoderTrap::Ignore)
.expect("Error encoding text")
}
@@ -319,12 +319,12 @@ impl Cue {
let raw_label = cue.label.as_ref().map(|val| RawLabel {
cue_point_id: n as u32,
text: convert_from_cue_string(&val),
text: convert_from_cue_string(val),
});
let raw_note = cue.note.as_ref().map(|val| RawNote {
cue_point_id: n as u32,
text: convert_from_cue_string(&val),
text: convert_from_cue_string(val),
});
let raw_ltxt = cue.length.map(|val| RawLtxt {