use vec![] macro to create Vector with first item inside instead of pushing to an empty vec![]
slightly reduces code bloat
This commit is contained in:
parent
71a6c7c803
commit
1c129f7b97
4 changed files with 7 additions and 9 deletions
|
@ -124,11 +124,10 @@ impl<'a, 'tcx> InferCtxtExt<'tcx> for InferCtxt<'a, 'tcx> {
|
|||
self.impl_similar_to(trait_ref, obligation).unwrap_or_else(|| trait_ref.def_id());
|
||||
let trait_ref = trait_ref.skip_binder();
|
||||
|
||||
let mut flags = vec![];
|
||||
flags.push((
|
||||
let mut flags = vec![(
|
||||
sym::ItemContext,
|
||||
self.describe_enclosure(obligation.cause.body_id).map(|s| s.to_owned()),
|
||||
));
|
||||
)];
|
||||
|
||||
match obligation.cause.code {
|
||||
ObligationCauseCode::BuiltinDerivedObligation(..)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue