Skip to content

Commit

Permalink
split_files -> split_mpd_file
Browse files Browse the repository at this point in the history
  • Loading branch information
ScanMountGoat committed Mar 6, 2023
1 parent a60fc50 commit c1c8685
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1073,7 +1073,7 @@ impl SourceMap {
pub fn insert(&mut self, source_file: SourceFile) -> String {
// The MPD extension allows .ldr or .mpd files to contain multiple files.
// Add each of these so that they can be resolved by subfile commands later.
let files = split_files(&source_file.cmds);
let files = split_mpd_file(&source_file.cmds);

if files.is_empty() {
// TODO: More cleanly handle the fact that not all files have 0 FILE commands.
Expand Down Expand Up @@ -1112,7 +1112,7 @@ impl SourceMap {
}
}

fn split_files(commands: &[Command]) -> Vec<SourceFile> {
fn split_mpd_file(commands: &[Command]) -> Vec<SourceFile> {
commands
.iter()
.enumerate()
Expand Down Expand Up @@ -2055,7 +2055,7 @@ mod tests {
}),
Command::NoFile,
];
let subfiles = split_files(&commands);
let subfiles = split_mpd_file(&commands);
assert_eq!(
vec![
SourceFile {
Expand Down Expand Up @@ -2098,7 +2098,7 @@ mod tests {
}),
];

let subfiles = split_files(&commands);
let subfiles = split_mpd_file(&commands);
assert_eq!(
vec![
SourceFile {
Expand Down

0 comments on commit c1c8685

Please sign in to comment.