mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-04-29 12:14:48 +00:00
logging: clear clippy warnings
This commit contains two changes: - clear clippy warnigns - add pkg/logging/Cargo.lock to .gitignore Signed-off-by: bin liu <bin@hyper.sh>
This commit is contained in:
parent
8c3228c286
commit
f32f49bdb7
1
.gitignore
vendored
1
.gitignore
vendored
@ -3,5 +3,6 @@
|
|||||||
**/*.rej
|
**/*.rej
|
||||||
**/target
|
**/target
|
||||||
**/.vscode
|
**/.vscode
|
||||||
|
pkg/logging/Cargo.lock
|
||||||
src/agent/src/version.rs
|
src/agent/src/version.rs
|
||||||
src/agent/kata-agent.service
|
src/agent/kata-agent.service
|
||||||
|
@ -93,9 +93,7 @@ impl HashSerializer {
|
|||||||
// Take care to only add the first instance of a key. This matters for loggers (but not
|
// Take care to only add the first instance of a key. This matters for loggers (but not
|
||||||
// Records) since a child loggers have parents and the loggers are serialised child first
|
// Records) since a child loggers have parents and the loggers are serialised child first
|
||||||
// meaning the *newest* fields are serialised first.
|
// meaning the *newest* fields are serialised first.
|
||||||
if !self.fields.contains_key(&key) {
|
self.fields.entry(key).or_insert(value);
|
||||||
self.fields.insert(key, value);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fn remove_field(&mut self, key: &str) {
|
fn remove_field(&mut self, key: &str) {
|
||||||
|
Loading…
Reference in New Issue
Block a user