MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / run

Method run

atomic-core/src/change/format_v3/semantic/predictive/encode.rs:114–140  ·  view source on GitHub ↗
(&mut self)

Source from the content-addressed store, hash-verified

112 Ok(())
113 }
114 fn run(&mut self) -> FormatResult<()> {
115 for _ in 0..self.count(FILES)? {
116 for _ in 0..self.count(LINES)? {
117 self.flag(OLD)?;
118 self.flag(NEW)?;
119 self.flag(RANGE)?;
120 match self.n(BRANCH)? {
121 0 => {
122 self.flag(BRANCH_AFTER)?;
123 self.leaves()?;
124 }
125 1 => self.leaves()?,
126 2 => {
127 self.leaves()?;
128 self.leaves()?;
129 }
130 3 => {}
131 4 => self.flag(BRANCH_AFTER)?,
132 _ => return Err(invalid("unknown predictive branch operation")),
133 }
134 }
135 }
136 if !self.input.is_empty() || !self.kinds.is_empty() || !self.refs.is_empty() {
137 return Err(invalid("unused predictive input"));
138 }
139 Ok(())
140 }
141}
142
143pub(in crate::change::format_v3::semantic) fn encode(

Callers 1

encodeFunction · 0.45

Calls 6

invalidFunction · 0.50
countMethod · 0.45
flagMethod · 0.45
nMethod · 0.45
leavesMethod · 0.45
is_emptyMethod · 0.45

Tested by

no test coverage detected