upgrade to rust 2018 and some other fixes
authorTim "S.D.Eagle" Zeitz <dev.tim.zeitz@gmail.com>
Fri, 7 Dec 2018 13:20:17 +0000 (14:20 +0100)
committerTim "S.D.Eagle" Zeitz <dev.tim.zeitz@gmail.com>
Fri, 7 Dec 2018 13:20:17 +0000 (14:20 +0100)
Cargo.lock
Cargo.toml
src/bin/compare_vector.rs
src/bin/decode_vector.rs
src/bin/encode_vector.rs
src/bin/example.rs
src/lib.rs
src/time.rs

index bc66e435e97dec10d38b28973db2bfbf46c6840b..53a2d25bebd633d32302a7f369b2a7ca5bba8914 100644 (file)
@@ -1,11 +1,11 @@
 [[package]]
 name = "libc"
 [[package]]
 name = "libc"
-version = "0.2.43"
+version = "0.2.44"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 
 [[package]]
 name = "redox_syscall"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 
 [[package]]
 name = "redox_syscall"
-version = "0.1.40"
+version = "0.1.43"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 
 [[package]]
 source = "registry+https://github.com/rust-lang/crates.io-index"
 
 [[package]]
@@ -20,8 +20,8 @@ name = "time"
 version = "0.1.40"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
 version = "0.1.40"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
- "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
- "redox_syscall 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)",
+ "redox_syscall 0.1.43 (registry+https://github.com/rust-lang/crates.io-index)",
  "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
  "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
@@ -45,8 +45,8 @@ version = "0.4.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 
 [metadata]
 source = "registry+https://github.com/rust-lang/crates.io-index"
 
 [metadata]
-"checksum libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)" = "76e3a3ef172f1a0b9a9ff0dd1491ae5e6c948b94479a3021819ba7d860c8645d"
-"checksum redox_syscall 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)" = "c214e91d3ecf43e9a4e41e578973adeb14b474f2bee858742d127af75a0112b1"
+"checksum libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)" = "10923947f84a519a45c8fefb7dd1b3e8c08747993381adee176d7a82b4195311"
+"checksum redox_syscall 0.1.43 (registry+https://github.com/rust-lang/crates.io-index)" = "679da7508e9a6390aeaf7fbd02a800fdc64b73fe2204dd2c8ae66d22d9d5ad5d"
 "checksum time 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)" = "d825be0eb33fda1a7e68012d51e9c7f451dc1a69391e7fdc197060bb8c56667b"
 "checksum winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "92c1eb33641e276cfa214a0522acad57be5c56b10cb348b3c5117db75f3ac4b0"
 "checksum winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
 "checksum time 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)" = "d825be0eb33fda1a7e68012d51e9c7f451dc1a69391e7fdc197060bb8c56667b"
 "checksum winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "92c1eb33641e276cfa214a0522acad57be5c56b10cb348b3c5117db75f3ac4b0"
 "checksum winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
index efe5553b4b81d8ee327c7cee68ba711ab3acddc6..344beb8b2cde2e8154d5e891b10481ffc5a22025 100644 (file)
@@ -2,6 +2,7 @@
 name = "stud-rust-base"
 version = "0.1.0"
 authors = ["Tim Zeitz <tim.zeitz@kit.edu>"]
 name = "stud-rust-base"
 version = "0.1.0"
 authors = ["Tim Zeitz <tim.zeitz@kit.edu>"]
+edition = '2018'
 
 [dependencies]
 
 [dependencies]
-time = "0.1.40"
+time = "^0.1.40"
index 5d42c182cd790390255d46bf2cae732ff59a893b..2f566edc254b8af08f625ca579bc01b3f31d6236 100644 (file)
@@ -1,4 +1,3 @@
-extern crate stud_rust_base;
 use stud_rust_base::{io::*, cli::CliErr};
 use std::{env, fmt::Display, error::Error};
 
 use stud_rust_base::{io::*, cli::CliErr};
 use std::{env, fmt::Display, error::Error};
 
index 691a7a09d2966084c50c74b492638c2c696c5c6d..4dca2e7ba46cd023de48a1d080d87bd109710c0d 100644 (file)
@@ -1,4 +1,3 @@
-extern crate stud_rust_base;
 use stud_rust_base::{io::*, cli::CliErr};
 use std::{env, error::Error};
 
 use stud_rust_base::{io::*, cli::CliErr};
 use std::{env, error::Error};
 
index c3996693d8e69ed279c6d68a341007ad26184f83..a51a63ad04c9904576714055d351611d117eb8b7 100644 (file)
@@ -1,4 +1,3 @@
-extern crate stud_rust_base;
 use stud_rust_base::{io::*, cli::CliErr};
 use std::{env, error::Error};
 
 use stud_rust_base::{io::*, cli::CliErr};
 use std::{env, error::Error};
 
index c0dbaf7b577faceac53b68e8bf778a57c370b325..f8e94342d850b4a87e2549b13e61792466e3f7e1 100644 (file)
@@ -1,5 +1,3 @@
-extern crate stud_rust_base;
-
 use stud_rust_base::{
     types::*,
     io::*,
 use stud_rust_base::{
     types::*,
     io::*,
index 85f3191635b60074e19146630fea710639a520a1..d0ab4df6877dcd0ffb1140dc66cc1038286deda9 100644 (file)
@@ -1,7 +1,5 @@
 //! A small base framework for route planning student projects.
 
 //! A small base framework for route planning student projects.
 
-extern crate time as time_crate;
-
 pub mod cli;
 pub mod index_heap;
 pub mod io;
 pub mod cli;
 pub mod index_heap;
 pub mod io;
index 8a3843c37641c72832c70eceec81f3b845d29b55..687f3e424a86d090431c335b5cfb196545bb5476 100644 (file)
@@ -1,15 +1,13 @@
 //! This module contains a few utilities to measure how long executing algorithms takes.
 //! It utilizes the `time` crate.
 
 //! This module contains a few utilities to measure how long executing algorithms takes.
 //! It utilizes the `time` crate.
 
-use time_crate as time;
-
 /// This function will measure how long it takes to execute the given lambda,
 /// print the time and return the result of the lambda.
 pub fn report_time<Out, F: FnOnce() -> Out>(name: &str, f: F) -> Out {
     let start = time::now();
 /// This function will measure how long it takes to execute the given lambda,
 /// print the time and return the result of the lambda.
 pub fn report_time<Out, F: FnOnce() -> Out>(name: &str, f: F) -> Out {
     let start = time::now();
-    println!("starting {}", name);
+    eprintln!("starting {}", name);
     let res = f();
     let res = f();
-    println!("done {} - took: {}", name, (time::now() - start));
+    eprintln!("done {} - took: {}", name, (time::now() - start));
     res
 }
 
     res
 }
 
@@ -46,7 +44,7 @@ impl Timer {
 
     /// Print the passed time in ms since the timer was started
     pub fn report_passed_ms(&self) {
 
     /// Print the passed time in ms since the timer was started
     pub fn report_passed_ms(&self) {
-        println!("{}ms", (time::now() - self.start).num_milliseconds());
+        eprintln!("{}ms", (time::now() - self.start).num_milliseconds());
     }
 
     /// Return the number of ms passed since the timer was started as a `i64`
     }
 
     /// Return the number of ms passed since the timer was started as a `i64`