Skip to content

Commit

Permalink
chore: fix clippy lints
Browse files Browse the repository at this point in the history
  • Loading branch information
mzabaluev committed Nov 17, 2024
1 parent 9bd8272 commit d83a32b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion benchmarks/benches/dataset.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ fn benchmark_dataset<M>(criterion: &mut Criterion, name: &str, dataset: &'static
where
M: prost::Message + Default + 'static,
{
let mut group = criterion.benchmark_group(&format!("dataset/{}", name));
let mut group = criterion.benchmark_group(format!("dataset/{}", name));

group.bench_function("merge", move |b| {
let dataset = load_dataset(dataset).unwrap();
Expand Down
3 changes: 1 addition & 2 deletions prost-build/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -378,8 +378,7 @@ impl Config {
///
/// Depending on the proto file syntax, the representation type can be:
/// * For closed enums (in proto2), the corresponding Rust enum type.
/// * For open enums (in proto3), the Rust enum type wrapped in
/// [`OpenEnum`](prost::OpenEnum).
/// * For open enums (in proto3), the Rust enum type wrapped in [`OpenEnum`](prost::OpenEnum).
///
/// # Arguments
///
Expand Down
4 changes: 2 additions & 2 deletions prost-derive/src/field/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -261,9 +261,9 @@ impl EnumType {
Meta::List(meta_list) => {
let ident = meta_list.parse_args::<Ident>()?;
if ident == "open" {
return Ok(Some(EnumType::Open));
Ok(Some(EnumType::Open))
} else if ident == "closed" {
return Ok(Some(EnumType::Closed));
Ok(Some(EnumType::Closed))
} else {
bail!("invalid content of enum_type attribute: {:?}", ident);
}
Expand Down

0 comments on commit d83a32b

Please sign in to comment.