Skip to content

Commit

Permalink
Change the method of IntList equals from toString to ListEquality.equals
Browse files Browse the repository at this point in the history
  • Loading branch information
stdxyx committed Jun 14, 2024
1 parent ccf104d commit 8809221
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion protoc_plugin/lib/src/shared.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

import 'dart:convert';
import 'dart:io';
import 'package:collection/collection.dart';

import '../protoc.dart';

Expand All @@ -23,8 +24,9 @@ extension FileDescriptorProtoExt on FileGenerator {
/// The output can contain multiple lines. None of the lines will have
/// trailing whitespace.
String? commentBlock(List<int> path) {
final eq = ListEquality().equals;
final bits = descriptor.sourceCodeInfo.location
.where((element) => element.path.toString() == path.toString())
.where((element) => eq(element.path, path))
.toList();

if (bits.length == 1) {
Expand Down

0 comments on commit 8809221

Please sign in to comment.