Skip to content

Commit

Permalink
Remove RefCell for fields in LocalTimeCacher
Browse files Browse the repository at this point in the history
  • Loading branch information
SpriteOvO committed Aug 16, 2024
1 parent 0aa5593 commit b5dc872
Show file tree
Hide file tree
Showing 3 changed files with 205 additions and 198 deletions.
4 changes: 2 additions & 2 deletions spdlog/src/formatter/full_formatter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,9 @@ impl FullFormatter {

{
let mut local_time_cacher = LOCAL_TIME_CACHER.lock();
let time = local_time_cacher.get(record.time());
let mut time = local_time_cacher.get(record.time());
dest.write_str("[")?;
dest.write_str(&time.full_second_str())?;
dest.write_str(time.full_second_str())?;
dest.write_str(".")?;
write!(dest, "{:03}", time.millisecond())?;
dest.write_str("] [")?;
Expand Down
Loading

0 comments on commit b5dc872

Please sign in to comment.