diff options
Diffstat (limited to 'ops/journaldriver')
-rw-r--r-- | ops/journaldriver/Cargo.lock | 2 | ||||
-rw-r--r-- | ops/journaldriver/src/main.rs | 6 |
2 files changed, 5 insertions, 3 deletions
diff --git a/ops/journaldriver/Cargo.lock b/ops/journaldriver/Cargo.lock index 40bdc962800a..f7c697068f13 100644 --- a/ops/journaldriver/Cargo.lock +++ b/ops/journaldriver/Cargo.lock @@ -1,3 +1,5 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. [[package]] name = "aho-corasick" version = "0.6.8" diff --git a/ops/journaldriver/src/main.rs b/ops/journaldriver/src/main.rs index a57bb3505ddc..9886af1c3696 100644 --- a/ops/journaldriver/src/main.rs +++ b/ops/journaldriver/src/main.rs @@ -45,7 +45,7 @@ extern crate systemd; extern crate ureq; use chrono::offset::LocalResult; -use chrono::prelude::*; +use chrono::prelude::{DateTime, TimeZone, Utc}; use failure::ResultExt; use serde_json::{from_str, Value}; use std::env; @@ -55,7 +55,7 @@ use std::mem; use std::path::PathBuf; use std::process; use std::time::{Duration, Instant}; -use systemd::journal::*; +use systemd::journal::{Journal, JournalFiles, JournalRecord, JournalSeek}; #[cfg(test)] mod tests; @@ -553,7 +553,7 @@ fn flush(token: &mut Token, if token.is_expired() { debug!("Refreshing Google metadata access token"); let new_token = get_token()?; - mem::replace(token, new_token); + *token = new_token; } for chunk in entries.chunks(750) { |