Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 5 additions & 11 deletions crates/payload/basic/src/stack.rs
Original file line number Diff line number Diff line change
Expand Up @@ -240,19 +240,13 @@ where
&self,
config: PayloadConfig<Self::Attributes, HeaderForPayload<Self::BuiltPayload>>,
) -> Result<Self::BuiltPayload, PayloadBuilderError> {
match config.attributes {
Either::Left(left_attr) => {
let left_config = PayloadConfig {
parent_header: config.parent_header.clone(),
attributes: left_attr,
};
match config {
PayloadConfig { parent_header, attributes: Either::Left(left_attr) } => {
let left_config = PayloadConfig { parent_header, attributes: left_attr };
self.left.build_empty_payload(left_config).map(Either::Left)
}
Either::Right(right_attr) => {
let right_config = PayloadConfig {
parent_header: config.parent_header.clone(),
attributes: right_attr,
};
PayloadConfig { parent_header, attributes: Either::Right(right_attr) } => {
let right_config = PayloadConfig { parent_header, attributes: right_attr };
self.right.build_empty_payload(right_config).map(Either::Right)
}
}
Expand Down
Loading