Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Fix clippy warnings #671

Merged
merged 1 commit into from Jun 27, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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