From 7fa0572f174c3f4a9f62fae6c2f8fe038cc6a7c3 Mon Sep 17 00:00:00 2001 From: Stan Bondi Date: Thu, 16 Sep 2021 12:25:44 +0400 Subject: [PATCH] fix: dead_code lint error when base_node_feature is not set (#3354) Description --- Use `new_sorted_unchecked` function to keep clippy happy when base_node feature is not active in tari_core. Motivation and Context --- Causing failed CI build (e.g. #3335 ) How Has This Been Tested? --- CI must pass (FFI tests) --- base_layer/core/src/transactions/aggregated_body.rs | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/base_layer/core/src/transactions/aggregated_body.rs b/base_layer/core/src/transactions/aggregated_body.rs index 23b7d2bba5..4a01acadcd 100644 --- a/base_layer/core/src/transactions/aggregated_body.rs +++ b/base_layer/core/src/transactions/aggregated_body.rs @@ -59,12 +59,8 @@ pub struct AggregateBody { impl AggregateBody { /// Create an empty aggregate body pub fn empty() -> AggregateBody { - AggregateBody { - sorted: false, - inputs: vec![], - outputs: vec![], - kernels: vec![], - } + // UNCHECKED: empty vecs are sorted + AggregateBody::new_sorted_unchecked(vec![], vec![], vec![]) } /// Create a new aggregate body from provided inputs, outputs and kernels