Skip to content

Commit

Permalink
rename var data into subtitles in write_srt
Browse files Browse the repository at this point in the history
and move it after writer
  • Loading branch information
gwen-lg committed May 19, 2024
1 parent 26f67ca commit 3c694c3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/srt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@ use crate::time::TimeSpan;
///
/// Will return `Err` if write in `writer` return an `Err`.
pub fn write_srt(
data: &[(TimeSpan, String)],
writer: &mut impl io::Write,
subtitles: &[(TimeSpan, String)],
) -> Result<(), io::Error> {
data.iter()
subtitles
.iter()
.enumerate()
.try_for_each(write_srt_line(writer))?;

Expand Down

0 comments on commit 3c694c3

Please sign in to comment.