[[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"
-version = "0.1.40"
+version = "0.1.43"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
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)",
]
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"
name = "stud-rust-base"
version = "0.1.0"
authors = ["Tim Zeitz <tim.zeitz@kit.edu>"]
+edition = '2018'
[dependencies]
-time = "0.1.40"
+time = "^0.1.40"
-extern crate stud_rust_base;
use stud_rust_base::{io::*, cli::CliErr};
use std::{env, fmt::Display, error::Error};
-extern crate stud_rust_base;
use stud_rust_base::{io::*, cli::CliErr};
use std::{env, error::Error};
-extern crate stud_rust_base;
use stud_rust_base::{io::*, cli::CliErr};
use std::{env, error::Error};
-extern crate stud_rust_base;
-
use stud_rust_base::{
types::*,
io::*,
//! 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;
//! 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();
- println!("starting {}", name);
+ eprintln!("starting {}", name);
let res = f();
- println!("done {} - took: {}", name, (time::now() - start));
+ eprintln!("done {} - took: {}", name, (time::now() - start));
res
}
/// 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`