]> git.proxmox.com Git - pmg-log-tracker.git/commit
drop 'time' dependency
authorWolfgang Bumiller <w.bumiller@proxmox.com>
Tue, 4 Jan 2022 13:57:23 +0000 (14:57 +0100)
committerStoiko Ivanov <s.ivanov@proxmox.com>
Mon, 14 Feb 2022 18:05:47 +0000 (19:05 +0100)
commit8f1719eebe3c4c353398807063f22ba3863e46f4
tree224950690fee6305e31e987ba9692336f8cb0793
parenta4d769405c836f2592713d3d380c4d47e68127ff
drop 'time' dependency

We're using a very old version of it and the functions we
actually use are available in glibc anyway.

The only difference I found was that the result of
glibc's `strptime()`'s `%s` does *not* want an additional
`.to_local()` call anymore...

... which was weird anyway.

As a minor optimization I pass the format string as `&CStr`
to avoid the memcpy.

(The CString::new() call in `strptime()` only happens during
parameter parsing)

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Reviewed-By: Stoiko Ivanov <s.ivanov@proxmox.com>
Tested-By: Stoiko Ivanov <s.ivanov@proxmox.com>
[dropped left-over and fixed FIXME]
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
Cargo.toml
src/main.rs
src/time.rs [new file with mode: 0644]