Fixed Clippy Warnings (#451)
* fixed clippy warn * fixed cargo clippy warnging * fixed clippy warngings in clippy ver 0.1.59 * fixed clippy warnings clippy::unnecessary_to_owned
This commit is contained in:
@@ -184,12 +184,11 @@ pub fn get_event_value<'a>(key: &str, event_value: &'a Value) -> Option<&'a Valu
|
||||
|
||||
Option::Some(ret)
|
||||
} else {
|
||||
let event_key;
|
||||
if !key.contains('.') {
|
||||
event_key = "Event.EventData.".to_string() + key;
|
||||
let event_key = if !key.contains('.') {
|
||||
"Event.EventData.".to_string() + key
|
||||
} else {
|
||||
event_key = key.to_string();
|
||||
}
|
||||
key.to_string()
|
||||
};
|
||||
for key in event_key.split('.') {
|
||||
if !ret.is_object() {
|
||||
return Option::None;
|
||||
@@ -207,7 +206,7 @@ pub fn get_thread_num() -> usize {
|
||||
let threadnum = &conf
|
||||
.args
|
||||
.value_of("thread-number")
|
||||
.unwrap_or_else(|| def_thread_num_str.as_str());
|
||||
.unwrap_or(def_thread_num_str.as_str());
|
||||
threadnum.parse::<usize>().unwrap()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user