[pmg-devel] [PATCH log-tracker] drop 'time' dependency

Stoiko Ivanov s.ivanov at proxmox.com
Mon Feb 14 19:09:33 CET 2022


applied - with the FIXME comment removed and my R-b, T-b tags added

huge thanks again!

On Tue,  4 Jan 2022 14:57:23 +0100
Wolfgang Bumiller <w.bumiller at proxmox.com> wrote:

> 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 at proxmox.com>
> ---
>  Cargo.toml  |   1 -
>  src/main.rs |  75 ++++++++---------------
>  src/time.rs | 169 ++++++++++++++++++++++++++++++++++++++++++++++++++++
>  3 files changed, 194 insertions(+), 51 deletions(-)
>  create mode 100644 src/time.rs
> 
> .. snip ...




More information about the pmg-devel mailing list