diff --git a/src/rust/engine/src/nodes.rs b/src/rust/engine/src/nodes.rs index c5a7a71b15e2..61ead28ce80e 100644 --- a/src/rust/engine/src/nodes.rs +++ b/src/rust/engine/src/nodes.rs @@ -788,31 +788,6 @@ impl From for NodeKey { } } -/// -/// A Node that represents consuming the stat for some path. -/// -/// NB: Because the `Scandir` operation gets the stats for a parent directory in a single syscall, -/// this operation results in no data, and is simply a placeholder for `Snapshot` Nodes to use to -/// declare a dependency on the existence/content of a particular path. This makes them more error -/// prone, unfortunately. -/// -#[derive(Clone, Debug, Eq, Hash, PartialEq)] -pub struct Stat(PathBuf); - -impl Node for Stat { - type Output = (); - - fn run(self, _: Context) -> NodeFuture<()> { - future::ok(()).to_boxed() - } -} - -impl From for NodeKey { - fn from(n: Stat) -> Self { - NodeKey::Stat(n) - } -} - /// /// A Node that represents executing a directory listing that returns a Stat per directory /// entry (generally in one syscall). No symlinks are expanded. @@ -1060,7 +1035,6 @@ pub enum NodeKey { DigestFile(DigestFile), ReadLink(ReadLink), Scandir(Scandir), - Stat(Stat), Select(Select), Snapshot(Snapshot), Task(Task), @@ -1078,7 +1052,6 @@ impl NodeKey { &NodeKey::DigestFile(ref s) => format!("DigestFile({:?})", s.0), &NodeKey::ReadLink(ref s) => format!("ReadLink({:?})", s.0), &NodeKey::Scandir(ref s) => format!("Scandir({:?})", s.0), - &NodeKey::Stat(ref s) => format!("Stat({:?})", s.0), &NodeKey::Select(ref s) => { format!( "Select({}, {})", @@ -1109,7 +1082,6 @@ impl NodeKey { &NodeKey::DigestFile(..) => "DigestFile".to_string(), &NodeKey::ReadLink(..) => "LinkDest".to_string(), &NodeKey::Scandir(..) => "DirectoryListing".to_string(), - &NodeKey::Stat(..) => "Stat".to_string(), } } @@ -1121,7 +1093,6 @@ impl NodeKey { &NodeKey::DigestFile(ref s) => Some(s.0.path.as_path()), &NodeKey::ReadLink(ref s) => Some((s.0).0.as_path()), &NodeKey::Scandir(ref s) => Some((s.0).0.as_path()), - &NodeKey::Stat(ref s) => Some(s.0.as_path()), // Not FS operations: // Explicitly listed so that if people add new NodeKeys they need to consider whether their @@ -1141,7 +1112,6 @@ impl Node for NodeKey { match self { NodeKey::DigestFile(n) => n.run(context).map(|v| v.into()).to_boxed(), NodeKey::ReadLink(n) => n.run(context).map(|v| v.into()).to_boxed(), - NodeKey::Stat(n) => n.run(context).map(|v| v.into()).to_boxed(), NodeKey::Scandir(n) => n.run(context).map(|v| v.into()).to_boxed(), NodeKey::Select(n) => n.run(context).map(|v| v.into()).to_boxed(), NodeKey::Snapshot(n) => n.run(context).map(|v| v.into()).to_boxed(),