X-Git-Url: https://i11git.iti.kit.edu/anon-gitweb/?p=Mitarbeiter%2FTim-Zeitz%2Fstud-rust-base.git;a=blobdiff_plain;f=src%2Fbin%2Fexample.rs;h=f8e94342d850b4a87e2549b13e61792466e3f7e1;hp=775d2ca7a85aadccd1b47976cb7b5b4904970ea1;hb=cac08e302995e25c4b5d99fd98a616d1207bae54;hpb=c56a14307218fbb51ad188826a431cd034cce473 diff --git a/src/bin/example.rs b/src/bin/example.rs index 775d2ca..f8e9434 100644 --- a/src/bin/example.rs +++ b/src/bin/example.rs @@ -1,5 +1,3 @@ -extern crate stud_rust_base; - use stud_rust_base::{ types::*, io::*, @@ -21,7 +19,7 @@ fn main() { report_time("iterating over arcs of some node", || { let node_id = 42; - for &edge_id in &head[first_out[node_id] as usize .. first_out[node_id + 1] as usize] { + for edge_id in first_out[node_id] .. first_out[node_id + 1] { println!("There is an arc from {} to {} with weight {}", node_id, head[edge_id as usize], travel_time[edge_id as usize]); } });