Skip to content

Commit d20b90a

Browse files
committed
cargo clippy --fix
1 parent 8e722a5 commit d20b90a

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

src/codecs/encoding/config.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ use vector_lib::configurable::configurable_component;
88
/// Encoding configuration.
99
#[configurable_component]
1010
#[derive(Clone, Debug)]
11-
#[serde(deny_unknown_fields)]
1211
/// Configures how events are encoded into raw bytes.
1312
/// The selected encoding also determines which input types (logs, metrics, traces) are supported.
1413
pub struct EncodingConfig {

src/sources/dnstap/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -290,18 +290,18 @@ impl FrameHandler for CommonFrameHandler {
290290
(PathPrefix::Event, &DNSTAP_VALUE_PATHS.raw_data),
291291
BASE64_STANDARD.encode(&frame),
292292
);
293-
} else { match DnstapParser::parse(
293+
} else if let Err(err) = DnstapParser::parse(
294294
&mut log_event,
295295
frame,
296296
DnsParserOptions {
297297
lowercase_hostnames: self.lowercase_hostnames,
298298
},
299-
) { Err(err) => {
299+
) {
300300
emit!(DnstapParseError {
301301
error: format!("Dnstap protobuf decode error {err:?}.")
302302
});
303303
return None;
304-
} _ => {}}}
304+
}
305305

306306
if self.log_namespace == LogNamespace::Vector {
307307
// The timestamp is inserted by the parser which caters for the Legacy namespace.

src/sources/util/framestream.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -674,11 +674,11 @@ async fn handle_tcp_frame<T>(
674674
frame_handler.max_frame_handling_tasks(),
675675
)
676676
.await;
677-
} else { match frame_handler.handle_event(received_from, frame) { Some(event) => {
677+
} else if let Some(event) = frame_handler.handle_event(received_from, frame) {
678678
if let Err(e) = event_sink.send_event(event).await {
679679
error!("Error sending event: {e:?}.");
680680
}
681-
} _ => {}}}
681+
}
682682
}
683683

684684
/**

0 commit comments

Comments
 (0)