Fix things
This commit is contained in:
parent
77e737dfa2
commit
a500d1e3cc
|
@ -1,10 +1,8 @@
|
||||||
fn func() {
|
let mut vec = vec![1, 2, 3];
|
||||||
let mut vec = vec![1, 2, 3];
|
let iter = vec.iter();
|
||||||
let iter = vec.iter();
|
loop {
|
||||||
loop {
|
match iter.next() {
|
||||||
match iter.next() {
|
Some(x) => vec.push(x),
|
||||||
Some(x) => vec.push(x),
|
None => break,
|
||||||
None => break,
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,4 @@
|
||||||
fn func() {
|
let mut vec = vec![1, 2, 3];
|
||||||
let mut vec = vec![1, 2, 3];
|
for value in &vec {
|
||||||
for value in &vec {
|
vec.push(value);
|
||||||
vec.push(value);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,7 +33,7 @@ Consider the piece of C++ code in Listings~\ref{d3i:undefined-behaviour-cpp} and
|
||||||
|
|
||||||
\begin{figure}[ht]
|
\begin{figure}[ht]
|
||||||
\centering
|
\centering
|
||||||
\begin{minipage}[c]{0.75\textwidth}
|
\begin{minipage}[c]{0.85\textwidth}
|
||||||
\lstinputlisting[
|
\lstinputlisting[
|
||||||
language=c++,
|
language=c++,
|
||||||
label={d3i:undefined-behaviour-cpp},
|
label={d3i:undefined-behaviour-cpp},
|
||||||
|
|
Loading…
Reference in New Issue