mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-04-28 19:54:35 +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
|
||||
**/target
|
||||
**/.vscode
|
||||
pkg/logging/Cargo.lock
|
||||
src/agent/src/version.rs
|
||||
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
|
||||
// Records) since a child loggers have parents and the loggers are serialised child first
|
||||
// meaning the *newest* fields are serialised first.
|
||||
if !self.fields.contains_key(&key) {
|
||||
self.fields.insert(key, value);
|
||||
}
|
||||
self.fields.entry(key).or_insert(value);
|
||||
}
|
||||
|
||||
fn remove_field(&mut self, key: &str) {
|
||||
|
Loading…
Reference in New Issue
Block a user