diff options
author | Lars Wirzenius <liw@liw.fi> | 2023-06-21 05:35:40 +0300 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2023-06-21 05:35:40 +0300 |
commit | 4694b6e7dcf29a01b47eee4a782e5b585cd80c39 (patch) | |
tree | 6c0e12feeacc6795726ee585625311c95b07d776 /src/bin/cli/mod.rs | |
parent | d8e88bcdf5fddab3757d64cb7ca4c355480a8ca5 (diff) | |
download | subplot-4694b6e7dcf29a01b47eee4a782e5b585cd80c39.tar.gz |
refactor: rename Document::files to ::embedded_files
This makes it more clear what kind of files we're talking about. The
old name could've meant, say, the markdown files.
Sponsored-by: author
Diffstat (limited to 'src/bin/cli/mod.rs')
-rw-r--r-- | src/bin/cli/mod.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/bin/cli/mod.rs b/src/bin/cli/mod.rs index dacf9b6..19e4fbf 100644 --- a/src/bin/cli/mod.rs +++ b/src/bin/cli/mod.rs @@ -13,7 +13,7 @@ use std::{collections::HashMap, convert::TryFrom}; use subplot::{Document, EmbeddedFile, Style, SubplotError}; pub fn extract_file<'a>(doc: &'a Document, filename: &str) -> Result<&'a EmbeddedFile> { - for file in doc.files() { + for file in doc.embedded_files() { if file.filename() == filename { return Ok(file); } @@ -78,7 +78,7 @@ impl TryFrom<&mut Document> for Metadata { .collect(); scenarios.sort_unstable(); let mut files: Vec<_> = doc - .files() + .embedded_files() .iter() .map(|f| f.filename().to_owned()) .collect(); |