Skip to content

Commit

Permalink
chore: Fix clippy warnings (#671)
Browse files Browse the repository at this point in the history
  • Loading branch information
LucioFranco committed Jun 27, 2022
1 parent b1c57cd commit 38ba547
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion prost-build/src/code_generator.rs
Expand Up @@ -1057,7 +1057,7 @@ struct EnumVariantMapping<'a> {
fn build_enum_value_mappings<'a>(
generated_enum_name: &str,
do_strip_enum_prefix: bool,
enum_values: &'a Vec<EnumValueDescriptorProto>,
enum_values: &'a [EnumValueDescriptorProto],
) -> Vec<EnumVariantMapping<'a>> {
let mut numbers = HashSet::new();
let mut generated_names = HashMap::new();
Expand Down
4 changes: 2 additions & 2 deletions src/encoding.rs
Expand Up @@ -1444,7 +1444,7 @@ mod test {
T: Debug + Default + PartialEq + Borrow<B>,
B: ?Sized,
{
prop_assume!(MIN_TAG <= tag && tag <= MAX_TAG);
prop_assume!((MIN_TAG..=MAX_TAG).contains(&tag));

let expected_len = encoded_len(tag, value.borrow());

Expand Down Expand Up @@ -1533,7 +1533,7 @@ mod test {
M: FnMut(WireType, &mut T, &mut Bytes, DecodeContext) -> Result<(), DecodeError>,
L: FnOnce(u32, &B) -> usize,
{
prop_assume!(MIN_TAG <= tag && tag <= MAX_TAG);
prop_assume!((MIN_TAG..=MAX_TAG).contains(&tag));

let expected_len = encoded_len(tag, value.borrow());

Expand Down

0 comments on commit 38ba547

Please sign in to comment.