projects
/
Mitarbeiter
/
Tim-Zeitz
/
stud-rust-base.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
9db2868
)
upgrade to rust 2018 and some other fixes
author
Tim "S.D.Eagle" Zeitz
<dev.tim.zeitz@gmail.com>
Fri, 7 Dec 2018 13:20:17 +0000
(14:20 +0100)
committer
Tim "S.D.Eagle" Zeitz
<dev.tim.zeitz@gmail.com>
Fri, 7 Dec 2018 13:20:17 +0000
(14:20 +0100)
Cargo.lock
patch
|
blob
|
history
Cargo.toml
patch
|
blob
|
history
src/bin/compare_vector.rs
patch
|
blob
|
history
src/bin/decode_vector.rs
patch
|
blob
|
history
src/bin/encode_vector.rs
patch
|
blob
|
history
src/bin/example.rs
patch
|
blob
|
history
src/lib.rs
patch
|
blob
|
history
src/time.rs
patch
|
blob
|
history
diff --git
a/Cargo.lock
b/Cargo.lock
index bc66e435e97dec10d38b28973db2bfbf46c6840b..53a2d25bebd633d32302a7f369b2a7ca5bba8914 100644
(file)
--- a/
Cargo.lock
+++ b/
Cargo.lock
@@
-1,11
+1,11
@@
[[package]]
name = "libc"
[[package]]
name = "libc"
-version = "0.2.4
3
"
+version = "0.2.4
4
"
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.4
0
"
+version = "0.1.4
3
"
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.4
3
(registry+https://github.com/rust-lang/crates.io-index)",
- "redox_syscall 0.1.4
0
(registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.4
4
(registry+https://github.com/rust-lang/crates.io-index)",
+ "redox_syscall 0.1.4
3
(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.4
3 (registry+https://github.com/rust-lang/crates.io-index)" = "76e3a3ef172f1a0b9a9ff0dd1491ae5e6c948b94479a3021819ba7d860c8645d
"
-"checksum redox_syscall 0.1.4
0 (registry+https://github.com/rust-lang/crates.io-index)" = "c214e91d3ecf43e9a4e41e578973adeb14b474f2bee858742d127af75a0112b1
"
+"checksum libc 0.2.4
4 (registry+https://github.com/rust-lang/crates.io-index)" = "10923947f84a519a45c8fefb7dd1b3e8c08747993381adee176d7a82b4195311
"
+"checksum redox_syscall 0.1.4
3 (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"
diff --git
a/Cargo.toml
b/Cargo.toml
index efe5553b4b81d8ee327c7cee68ba711ab3acddc6..344beb8b2cde2e8154d5e891b10481ffc5a22025 100644
(file)
--- a/
Cargo.toml
+++ b/
Cargo.toml
@@
-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"
diff --git
a/src/bin/compare_vector.rs
b/src/bin/compare_vector.rs
index 5d42c182cd790390255d46bf2cae732ff59a893b..2f566edc254b8af08f625ca579bc01b3f31d6236 100644
(file)
--- a/
src/bin/compare_vector.rs
+++ b/
src/bin/compare_vector.rs
@@
-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};
diff --git
a/src/bin/decode_vector.rs
b/src/bin/decode_vector.rs
index 691a7a09d2966084c50c74b492638c2c696c5c6d..4dca2e7ba46cd023de48a1d080d87bd109710c0d 100644
(file)
--- a/
src/bin/decode_vector.rs
+++ b/
src/bin/decode_vector.rs
@@
-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};
diff --git
a/src/bin/encode_vector.rs
b/src/bin/encode_vector.rs
index c3996693d8e69ed279c6d68a341007ad26184f83..a51a63ad04c9904576714055d351611d117eb8b7 100644
(file)
--- a/
src/bin/encode_vector.rs
+++ b/
src/bin/encode_vector.rs
@@
-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};
diff --git
a/src/bin/example.rs
b/src/bin/example.rs
index c0dbaf7b577faceac53b68e8bf778a57c370b325..f8e94342d850b4a87e2549b13e61792466e3f7e1 100644
(file)
--- 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::*,
use stud_rust_base::{
types::*,
io::*,
diff --git
a/src/lib.rs
b/src/lib.rs
index 85f3191635b60074e19146630fea710639a520a1..d0ab4df6877dcd0ffb1140dc66cc1038286deda9 100644
(file)
--- a/
src/lib.rs
+++ b/
src/lib.rs
@@
-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;
diff --git
a/src/time.rs
b/src/time.rs
index 8a3843c37641c72832c70eceec81f3b845d29b55..687f3e424a86d090431c335b5cfb196545bb5476 100644
(file)
--- a/
src/time.rs
+++ b/
src/time.rs
@@
-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);
+
e
println!("starting {}", name);
let res = f();
let res = f();
- println!("done {} - took: {}", name, (time::now() - start));
+
e
println!("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());
+
e
println!("{}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`