Skip to content

Commit

Permalink
chore(dumper): docs
Browse files Browse the repository at this point in the history
  • Loading branch information
nerodono authored and loyd committed Dec 21, 2024
1 parent 38aaf64 commit e6dabe6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions elfo-dumper/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ pub struct Config {
/// A path to a dump file or template:
/// * `path/all.dump` - one file.
/// * `path/{class}.dump` - file per class.
/// * `path/{time:<FORMAT>}.dump` - file per dump time. The `<FORMAT>`
/// refers to the time format as in strftime:
/// <https://cplusplus.com/reference/ctime/strftime/> (`man strftime(3)`).
pub path: DumpPath,
/// How often dumpers should write dumps to files.
/// `500ms` by default.
Expand Down
4 changes: 2 additions & 2 deletions elfo-dumper/src/config/dump_path.rs
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ enum Variable {

/// Time of the dump.
Time {
/// strptime string format.
/// strftime string format.
format: cstr::Utf8CString,
},
}
Expand Down Expand Up @@ -241,7 +241,7 @@ fn strftime(ts: i64, format: &cstr::Utf8CString, dest: &mut String) -> bool {
unsafe {
// 1. mem::transmute wouldn't compile if u8 and libc::c_char differ in size
// (there are strange circumstances).
// 2. `libc::c_char` to i8 is i8 -> u8 conversion, thus converting
// 2. `libc::c_char` to u8 is i8 -> u8 conversion, thus converting
// same-sized arrays through transmute is safe (btw transmute checks that
// condition in compile time)
let u8_array = std::mem::transmute::<
Expand Down

0 comments on commit e6dabe6

Please sign in to comment.