aboutsummaryrefslogtreecommitdiff
path: root/src/makefile/target.rs
diff options
context:
space:
mode:
authorMelody Horn <melody@boringcactus.com>2021-03-31 13:23:32 -0600
committerMelody Horn <melody@boringcactus.com>2021-03-31 13:23:32 -0600
commit9666eea62b8cf763027d1f01acbb403c1c6097e0 (patch)
treefb7f825089323ac8ef19203e7ff80f41156ce01b /src/makefile/target.rs
parent9d3e0824a0966c648e951e5928c241700ee931fb (diff)
downloadmakers-9666eea62b8cf763027d1f01acbb403c1c6097e0.tar.gz
makers-9666eea62b8cf763027d1f01acbb403c1c6097e0.zip
issuing correction on a previous post of mine, regarding pub(crate)
Diffstat (limited to 'src/makefile/target.rs')
-rw-r--r--src/makefile/target.rs14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/makefile/target.rs b/src/makefile/target.rs
index 04603c9..64fdb7d 100644
--- a/src/makefile/target.rs
+++ b/src/makefile/target.rs
@@ -8,11 +8,11 @@ use crate::makefile::command_line::CommandLine;
use super::Makefile;
#[derive(PartialEq, Eq, Clone, Debug)]
-pub(crate) struct Target {
- pub(crate) name: String,
- pub(crate) prerequisites: Vec<String>,
- pub(crate) commands: Vec<CommandLine>,
- pub(crate) already_updated: Cell<bool>,
+pub struct Target {
+ pub name: String,
+ pub prerequisites: Vec<String>,
+ pub commands: Vec<CommandLine>,
+ pub already_updated: Cell<bool>,
}
impl Target {
@@ -22,7 +22,7 @@ impl Target {
.ok()
}
- pub(crate) fn newer_than(&self, other: &Self) -> Option<bool> {
+ pub fn newer_than(&self, other: &Self) -> Option<bool> {
let self_updated = self.already_updated.get();
let other_updated = other.already_updated.get();
Some(match (self.modified_time(), other.modified_time()) {
@@ -50,7 +50,7 @@ impl Target {
exists && newer_than_all_dependencies
}
- pub(crate) fn update(&self, file: &Makefile) -> anyhow::Result<()> {
+ pub fn update(&self, file: &Makefile) -> anyhow::Result<()> {
for prereq in &self.prerequisites {
file.update_target(prereq)?;
}