Compare commits

...

12 Commits

Author SHA1 Message Date
f0c33e2ad9
[release] logtimes v1.0.28 2025-04-08 18:36:15 +02:00
cf3ddc6c6a
[rustfmt] include order changed 2025-04-08 18:36:06 +02:00
4f81e1dcf4
[clippy] remove unnecessary semicolon 2025-04-08 18:35:29 +02:00
b5c18ace38
[release] logtimes v1.0.27 2025-04-08 18:32:40 +02:00
f8c93a9b26
[deps] cargo update
Adding   rustversion                v1.0.20
Adding   windows-implement          v0.60.0
Adding   windows-interface          v0.59.1
Adding   windows-link               v0.1.1
Adding   windows-result             v0.3.2
Adding   windows-strings            v0.4.0
Removing windows_aarch64_gnullvm    v0.52.6
Removing windows_aarch64_msvc       v0.52.6
Removing windows_i686_gnullvm       v0.52.6
Removing windows_i686_gnu           v0.52.6
Removing windows_i686_msvc          v0.52.6
Removing windows-targets            v0.52.6
Removing windows_x86_64_gnullvm     v0.52.6
Removing windows_x86_64_gnu         v0.52.6
Removing windows_x86_64_msvc        v0.52.6
Updating bumpalo                    v3.16.0  -> v3.17.0
Updating cc                         v1.2.3   -> v1.2.18
Updating chrono                     v0.4.39  -> v0.4.40
Updating iana-time-zone             v0.1.61  -> v0.1.63
Updating js-sys                     v0.3.76  -> v0.3.77
Updating libc                       v0.2.168 -> v0.2.171
Updating log                        v0.4.22  -> v0.4.27
Updating once_cell                  v1.20.2  -> v1.21.3
Updating proc-macro2                v1.0.92  -> v1.0.94
Updating quote                      v1.0.37  -> v1.0.40
Updating syn                        v2.0.90  -> v2.0.100
Updating unicode-ident              v1.0.14  -> v1.0.18
Updating wasm-bindgen-backend       v0.2.99  -> v0.2.100
Updating wasm-bindgen-macro-support v0.2.99  -> v0.2.100
Updating wasm-bindgen-macro         v0.2.99  -> v0.2.100
Updating wasm-bindgen-shared        v0.2.99  -> v0.2.100
Updating wasm-bindgen               v0.2.99  -> v0.2.100
Updating windows-core               v0.52.0  -> v0.61.0
2025-04-08 18:32:39 +02:00
0599c0877c
[release] logtimes v1.0.26 2024-12-09 13:49:52 +01:00
f56d3d8b1f
[deps] cargo update
Updating cc                         v1.2.2   -> v1.2.3
Updating chrono                     v0.4.38  -> v0.4.39
Updating js-sys                     v0.3.74  -> v0.3.76
Updating libc                       v0.2.167 -> v0.2.168
Updating wasm-bindgen-backend       v0.2.97  -> v0.2.99
Updating wasm-bindgen-macro-support v0.2.97  -> v0.2.99
Updating wasm-bindgen-macro         v0.2.97  -> v0.2.99
Updating wasm-bindgen-shared        v0.2.97  -> v0.2.99
Updating wasm-bindgen               v0.2.97  -> v0.2.99
2024-12-09 13:49:45 +01:00
eaf877f59c
[release] logtimes v1.0.25 2024-12-02 13:19:24 +01:00
b39aeb0df9
[deps] cargo update
Updating cc                         v1.2.1   -> v1.2.2
Updating js-sys                     v0.3.72  -> v0.3.74
Updating libc                       v0.2.166 -> v0.2.167
Updating syn                        v2.0.89  -> v2.0.90
Updating wasm-bindgen-backend       v0.2.95  -> v0.2.97
Updating wasm-bindgen-macro-support v0.2.95  -> v0.2.97
Updating wasm-bindgen-macro         v0.2.95  -> v0.2.97
Updating wasm-bindgen-shared        v0.2.95  -> v0.2.97
Updating wasm-bindgen               v0.2.95  -> v0.2.97
2024-12-02 13:19:18 +01:00
7b99e90663
[release] logtimes v1.0.24 2024-11-28 15:32:05 +01:00
9ea6a6e224
[deps] cargo update
Updating libc          v0.2.164 -> v0.2.166
Updating proc-macro2   v1.0.89  -> v1.0.92
Updating syn           v2.0.87  -> v2.0.89
Updating unicode-ident v1.0.13  -> v1.0.14
2024-11-28 15:32:04 +01:00
4fd4acec0e
[code] remove inline. benchmarks show no difference 2024-11-28 15:31:44 +01:00
3 changed files with 87 additions and 93 deletions

171
Cargo.lock generated
View File

@ -25,15 +25,15 @@ checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26"
[[package]]
name = "bumpalo"
version = "3.16.0"
version = "3.17.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c"
checksum = "1628fb46dfa0b37568d12e5edd512553eccf6a22a78e8bde00bb4aed84d5bdbf"
[[package]]
name = "cc"
version = "1.2.1"
version = "1.2.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fd9de9f2205d5ef3fd67e685b0df337994ddd4495e2a28d185500d0e1edfea47"
checksum = "525046617d8376e3db1deffb079e91cef90a89fc3ca5c185bbf8c9ecdd15cd5c"
dependencies = [
"shlex",
]
@ -46,14 +46,14 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
[[package]]
name = "chrono"
version = "0.4.38"
version = "0.4.40"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a21f936df1771bf62b77f047b726c4625ff2e8aa607c01ec06e5a05bd8463401"
checksum = "1a7964611d71df112cb1730f2ee67324fcf4d0fc6606acbbe9bfe06df124637c"
dependencies = [
"android-tzdata",
"iana-time-zone",
"num-traits",
"windows-targets",
"windows-link",
]
[[package]]
@ -64,14 +64,15 @@ checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b"
[[package]]
name = "iana-time-zone"
version = "0.1.61"
version = "0.1.63"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "235e081f3925a06703c2d0117ea8b91f042756fd6e7a6e5d901e8ca1a996b220"
checksum = "b0c919e5debc312ad217002b8048a17b7d83f80703865bbfcfebb0458b0b27d8"
dependencies = [
"android_system_properties",
"core-foundation-sys",
"iana-time-zone-haiku",
"js-sys",
"log",
"wasm-bindgen",
"windows-core",
]
@ -87,28 +88,29 @@ dependencies = [
[[package]]
name = "js-sys"
version = "0.3.72"
version = "0.3.77"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6a88f1bda2bd75b0452a14784937d796722fdebfe50df998aeb3f0b7603019a9"
checksum = "1cfaf33c695fc6e08064efbc1f72ec937429614f25eef83af942d0e227c3a28f"
dependencies = [
"once_cell",
"wasm-bindgen",
]
[[package]]
name = "libc"
version = "0.2.164"
version = "0.2.171"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "433bfe06b8c75da9b2e3fbea6e5329ff87748f0b144ef75306e674c3f6f7c13f"
checksum = "c19937216e9d3aa9956d9bb8dfc0b0c8beb6058fc4f7a4dc4d850edf86a237d6"
[[package]]
name = "log"
version = "0.4.22"
version = "0.4.27"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24"
checksum = "13dc2df351e3202783a1fe0d44375f7295ffb4049267b0f3018346dc122a1d94"
[[package]]
name = "logtimes"
version = "1.0.23"
version = "1.0.28"
dependencies = [
"chrono",
]
@ -124,28 +126,34 @@ dependencies = [
[[package]]
name = "once_cell"
version = "1.20.2"
version = "1.21.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775"
checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d"
[[package]]
name = "proc-macro2"
version = "1.0.89"
version = "1.0.94"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f139b0662de085916d1fb67d2b4169d1addddda1919e696f3252b740b629986e"
checksum = "a31971752e70b8b2686d7e46ec17fb38dad4051d94024c88df49b667caea9c84"
dependencies = [
"unicode-ident",
]
[[package]]
name = "quote"
version = "1.0.37"
version = "1.0.40"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af"
checksum = "1885c039570dc00dcb4ff087a89e185fd56bae234ddc7f056a945bf36467248d"
dependencies = [
"proc-macro2",
]
[[package]]
name = "rustversion"
version = "1.0.20"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "eded382c5f5f786b989652c49544c4877d9f015cc22e145a5ea8ea66c2921cd2"
[[package]]
name = "shlex"
version = "1.3.0"
@ -154,9 +162,9 @@ checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64"
[[package]]
name = "syn"
version = "2.0.87"
version = "2.0.100"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "25aa4ce346d03a6dcd68dd8b4010bcb74e54e62c90c573f394c46eae99aba32d"
checksum = "b09a44accad81e1ba1cd74a32461ba89dee89095ba17b32f5d03683b1b1fc2a0"
dependencies = [
"proc-macro2",
"quote",
@ -165,30 +173,30 @@ dependencies = [
[[package]]
name = "unicode-ident"
version = "1.0.13"
version = "1.0.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e91b56cd4cadaeb79bbf1a5645f6b4f8dc5bde8834ad5894a8db35fda9efa1fe"
checksum = "5a5f39404a5da50712a4c1eecf25e90dd62b613502b7e925fd4e4d19b5c96512"
[[package]]
name = "wasm-bindgen"
version = "0.2.95"
version = "0.2.100"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "128d1e363af62632b8eb57219c8fd7877144af57558fb2ef0368d0087bddeb2e"
checksum = "1edc8929d7499fc4e8f0be2262a241556cfc54a0bea223790e71446f2aab1ef5"
dependencies = [
"cfg-if",
"once_cell",
"rustversion",
"wasm-bindgen-macro",
]
[[package]]
name = "wasm-bindgen-backend"
version = "0.2.95"
version = "0.2.100"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cb6dd4d3ca0ddffd1dd1c9c04f94b868c37ff5fac97c30b97cff2d74fce3a358"
checksum = "2f0a0651a5c2bc21487bde11ee802ccaf4c51935d0d3d42a6101f98161700bc6"
dependencies = [
"bumpalo",
"log",
"once_cell",
"proc-macro2",
"quote",
"syn",
@ -197,9 +205,9 @@ dependencies = [
[[package]]
name = "wasm-bindgen-macro"
version = "0.2.95"
version = "0.2.100"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e79384be7f8f5a9dd5d7167216f022090cf1f9ec128e6e6a482a2cb5c5422c56"
checksum = "7fe63fc6d09ed3792bd0897b314f53de8e16568c2b3f7982f468c0bf9bd0b407"
dependencies = [
"quote",
"wasm-bindgen-macro-support",
@ -207,9 +215,9 @@ dependencies = [
[[package]]
name = "wasm-bindgen-macro-support"
version = "0.2.95"
version = "0.2.100"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "26c6ab57572f7a24a4985830b120de1594465e5d500f24afe89e16b4e833ef68"
checksum = "8ae87ea40c9f689fc23f209965b6fb8a99ad69aeeb0231408be24920604395de"
dependencies = [
"proc-macro2",
"quote",
@ -220,79 +228,68 @@ dependencies = [
[[package]]
name = "wasm-bindgen-shared"
version = "0.2.95"
version = "0.2.100"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "65fc09f10666a9f147042251e0dda9c18f166ff7de300607007e96bdebc1068d"
checksum = "1a05d73b933a847d6cccdda8f838a22ff101ad9bf93e33684f39c1f5f0eece3d"
dependencies = [
"unicode-ident",
]
[[package]]
name = "windows-core"
version = "0.52.0"
version = "0.61.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9"
checksum = "4763c1de310c86d75a878046489e2e5ba02c649d185f21c67d4cf8a56d098980"
dependencies = [
"windows-targets",
"windows-implement",
"windows-interface",
"windows-link",
"windows-result",
"windows-strings",
]
[[package]]
name = "windows-targets"
version = "0.52.6"
name = "windows-implement"
version = "0.60.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973"
checksum = "a47fddd13af08290e67f4acabf4b459f647552718f683a7b415d290ac744a836"
dependencies = [
"windows_aarch64_gnullvm",
"windows_aarch64_msvc",
"windows_i686_gnu",
"windows_i686_gnullvm",
"windows_i686_msvc",
"windows_x86_64_gnu",
"windows_x86_64_gnullvm",
"windows_x86_64_msvc",
"proc-macro2",
"quote",
"syn",
]
[[package]]
name = "windows_aarch64_gnullvm"
version = "0.52.6"
name = "windows-interface"
version = "0.59.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3"
checksum = "bd9211b69f8dcdfa817bfd14bf1c97c9188afa36f4750130fcdf3f400eca9fa8"
dependencies = [
"proc-macro2",
"quote",
"syn",
]
[[package]]
name = "windows_aarch64_msvc"
version = "0.52.6"
name = "windows-link"
version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469"
checksum = "76840935b766e1b0a05c0066835fb9ec80071d4c09a16f6bd5f7e655e3c14c38"
[[package]]
name = "windows_i686_gnu"
version = "0.52.6"
name = "windows-result"
version = "0.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b"
checksum = "c64fd11a4fd95df68efcfee5f44a294fe71b8bc6a91993e2791938abcc712252"
dependencies = [
"windows-link",
]
[[package]]
name = "windows_i686_gnullvm"
version = "0.52.6"
name = "windows-strings"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66"
[[package]]
name = "windows_i686_msvc"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66"
[[package]]
name = "windows_x86_64_gnu"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78"
[[package]]
name = "windows_x86_64_gnullvm"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d"
[[package]]
name = "windows_x86_64_msvc"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec"
checksum = "7a2ba9642430ee452d5a7aa78d72907ebe8cfda358e8cb7918a2050581322f97"
dependencies = [
"windows-link",
]

View File

@ -1,6 +1,6 @@
[package]
name = "logtimes"
version = "1.0.23"
version = "1.0.28"
authors = ["Paul Schulze <p.schulze@avm.de>"]
edition = "2021"

View File

@ -1,7 +1,7 @@
use std::{
env::args,
fs::File,
io::{stdin, stdout, Error as IoError, ErrorKind, Read, Write},
io::{Error as IoError, ErrorKind, Read, Write, stdin, stdout},
};
use chrono::prelude::*;
@ -10,7 +10,6 @@ const TIME_FORMAT: &str = "%H:%M:%S%.3f";
type LogtimesResult = Result<(), IoError>;
#[inline(always)]
fn print_time<T>(output: &mut T) -> LogtimesResult
where
T: Write,
@ -20,7 +19,6 @@ where
write!(output, "[{}] ", &date_now)
}
#[inline(always)]
fn print_time_color<T>(output: &mut T) -> Result<(), std::io::Error>
where
T: Write,
@ -33,7 +31,6 @@ where
write!(output, "{}[{}]{} ", color_green, &date_now, color_off)
}
#[inline(always)]
fn print_delete_line<T>(output: &mut T) -> LogtimesResult
where
T: Write,
@ -97,7 +94,7 @@ fn run() -> LogtimesResult {
f.write_all(&linebuf[..end])?;
f.write_all(b"\n")?;
f.flush()?;
};
}
// clear line buffer, so it is fresh for the next line
linebuf.clear();