Skip to content

Commit a577bec

Browse files
committed
Shared: Fix clippy warnings in shared extractor
1 parent 2d5b350 commit a577bec

File tree

3 files changed

+3
-6
lines changed

3 files changed

+3
-6
lines changed

.github/workflows/tree-sitter-extractor-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,4 +43,4 @@ jobs:
4343
steps:
4444
- uses: actions/checkout@v3
4545
- name: Run clippy
46-
run: cargo clippy -- --no-deps # -D warnings
46+
run: cargo clippy -- --no-deps -D warnings -A clippy::new_without_default -A clippy::too_many_arguments

shared/tree-sitter-extractor/src/extractor/simple.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ impl Extractor {
6262
main_thread_logger.write(
6363
main_thread_logger
6464
.new_entry("configuration-error", "Configuration error")
65-
.message("{}; using gzip.", &[diagnostics::MessageArg::Code(&e)])
65+
.message("{}; using gzip.", &[diagnostics::MessageArg::Code(e)])
6666
.severity(diagnostics::Severity::Warning),
6767
);
6868
trap::Compression::Gzip

shared/tree-sitter-extractor/src/node_types.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,10 +83,7 @@ pub enum Storage {
8383

8484
impl Storage {
8585
pub fn is_column(&self) -> bool {
86-
match self {
87-
Storage::Column { .. } => true,
88-
_ => false,
89-
}
86+
matches!(self, Storage::Column { .. })
9087
}
9188
}
9289
pub fn read_node_types(prefix: &str, node_types_path: &Path) -> std::io::Result<NodeTypeMap> {

0 commit comments

Comments
 (0)