From c9726d8a00b9bc59debee441c3d700be924a60b1 Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Tue, 23 Feb 2021 13:59:43 +0200 Subject: chore(ops/journaldriver): Expand wildcard imports ... to appease Profpatsch. Change-Id: Id8576645a6920312c2304ea7880524d9cda8e21b Reviewed-on: https://cl.tvl.fyi/c/depot/+/2544 Tested-by: BuildkiteCI Reviewed-by: Profpatsch --- ops/journaldriver/Cargo.lock | 2 ++ ops/journaldriver/src/main.rs | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'ops/journaldriver') 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) { -- cgit 1.4.1