mirror of
https://github.com/paradigmxyz/reth.git
synced 2026-02-19 03:04:27 -05:00
refactor(tracing): use Option::transpose() for file_guard (#22181)
This commit is contained in:
@@ -249,11 +249,10 @@ impl Tracer for RethTracer {
|
||||
layers.journald(&config)?;
|
||||
}
|
||||
|
||||
let file_guard = if let Some((config, file_info)) = self.file {
|
||||
Some(layers.file(config.format, &config.filters, file_info)?)
|
||||
} else {
|
||||
None
|
||||
};
|
||||
let file_guard = self
|
||||
.file
|
||||
.map(|(config, file_info)| layers.file(config.format, &config.filters, file_info))
|
||||
.transpose()?;
|
||||
|
||||
if let Some(config) = self.samply {
|
||||
layers.samply(config)?;
|
||||
|
||||
Reference in New Issue
Block a user