Skip to content

Commit

Permalink
Remove RefCell in LocalTimeCacher
Browse files Browse the repository at this point in the history
  • Loading branch information
SpriteOvO committed Jul 25, 2024
1 parent b71eef4 commit dec2127
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 dec2127

Please sign in to comment.