Browse Source

adds HistLog::new_with_tag

master
Jonathan Strong 6 years ago
parent
commit
4c59e4616d
1 changed files with 5 additions and 1 deletions
  1. +5
    -1
      src/hist.rs

+ 5
- 1
src/hist.rs View File

@@ -61,7 +61,11 @@ impl HistLog {
Self { series, tag, freq, last_sent, tx, hist, thread }
}

pub fn clone_with_tag(&self, tag: &'static str) -> HistLog {
pub fn new_with_tag(&self, tag: &'static str) -> Self {
Self::new(self.series, tag, self.freq)
}

pub fn clone_with_tag(&self, tag: &'static str) -> Self {
let thread = self.thread.as_ref().map(|x| Arc::clone(x)).unwrap();
assert!(self.thread.is_some(), "self.thread is {:?}", self.thread);
let tx = self.tx.clone();


Loading…
Cancel
Save