Skip to content

Commit

Permalink
Binding by-ref and by-move in the same pattern is now stable (#6067)
Browse files Browse the repository at this point in the history
  • Loading branch information
quodlibetor committed Mar 12, 2021
1 parent a08627e commit 7282293
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions src/dataflow/src/decode/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -401,13 +401,8 @@ where
(_, SourceEnvelope::CdcV2) => {
unreachable!("Internal error: CDCv2 is not supported yet on non-Avro sources.")
}
(DataEncoding::Avro(enc), SourceEnvelope::Debezium(_)) => {
// can't get this from the above match arm because:
// `error[E0658]: binding by-move and by-ref in the same pattern is unstable`
let dedup_strat = match envelope {
SourceEnvelope::Debezium(ds) => *ds,
_ => unreachable!(),
};
(DataEncoding::Avro(enc), SourceEnvelope::Debezium(ds)) => {
let dedup_strat = *ds;
let fields = match &desc.typ().column_types[0].scalar_type {
ScalarType::Record { fields, .. } => fields.clone(),
_ => unreachable!(),
Expand Down

0 comments on commit 7282293

Please sign in to comment.