upgrade to rust 2018 and some other fixes
[Mitarbeiter/Tim-Zeitz/stud-rust-base.git] / src / bin / example.rs
index 775d2ca7a85aadccd1b47976cb7b5b4904970ea1..f8e94342d850b4a87e2549b13e61792466e3f7e1 100644 (file)
@@ -1,5 +1,3 @@
-extern crate stud_rust_base;
-
 use stud_rust_base::{
     types::*,
     io::*,
 use stud_rust_base::{
     types::*,
     io::*,
@@ -21,7 +19,7 @@ fn main() {
 
     report_time("iterating over arcs of some node", || {
         let node_id = 42;
 
     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]);
         }
     });
             println!("There is an arc from {} to {} with weight {}", node_id, head[edge_id as usize], travel_time[edge_id as usize]);
         }
     });