From 2133756d506c3aec77bc89816c7e5d0e229df912 Mon Sep 17 00:00:00 2001 From: Collin Chin Date: Tue, 27 Oct 2020 11:07:35 -0700 Subject: [PATCH] Prefer slice over vector reference in membership_failed Co-authored-by: ljedrz --- dynamic-check/src/errors/type_assertion.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dynamic-check/src/errors/type_assertion.rs b/dynamic-check/src/errors/type_assertion.rs index 04ce0c7c3f..f776ea4b02 100644 --- a/dynamic-check/src/errors/type_assertion.rs +++ b/dynamic-check/src/errors/type_assertion.rs @@ -57,7 +57,7 @@ impl TypeAssertionError { /// /// Given type is not a member of the set of expected types. /// - pub fn membership_failed(given: &Type, set: &Vec, span: &Span) -> Self { + pub fn membership_failed(given: &Type, set: &[Type], span: &Span) -> Self { let message = format!( "Mismatched types. Given type `{}` is not in the expected type set `{:?}`.", given, set