Merge pull request #13055 from hmac/tree-sitter-extractor-clippy-fixes

Shared: Fix clippy in shared extractor
This commit is contained in:
Arthur Baars
2023-05-05 09:48:51 +02:00
committed by GitHub
4 changed files with 10 additions and 6 deletions

View File

@@ -43,4 +43,4 @@ jobs:
steps:
- uses: actions/checkout@v3
- name: Run clippy
run: cargo clippy -- --no-deps # -D warnings
run: cargo clippy -- --no-deps -D warnings -A clippy::new_without_default -A clippy::too_many_arguments

View File

@@ -0,0 +1,7 @@
# This file specifies the Rust version used to develop and test the shared
# extractor. It is set to the lowest version of Rust we want to support.
[toolchain]
channel = "1.68"
profile = "minimal"
components = [ "clippy", "rustfmt" ]

View File

@@ -62,7 +62,7 @@ impl Extractor {
main_thread_logger.write(
main_thread_logger
.new_entry("configuration-error", "Configuration error")
.message("{}; using gzip.", &[diagnostics::MessageArg::Code(&e)])
.message("{}; using gzip.", &[diagnostics::MessageArg::Code(e)])
.severity(diagnostics::Severity::Warning),
);
trap::Compression::Gzip

View File

@@ -83,10 +83,7 @@ pub enum Storage {
impl Storage {
pub fn is_column(&self) -> bool {
match self {
Storage::Column { .. } => true,
_ => false,
}
matches!(self, Storage::Column { .. })
}
}
pub fn read_node_types(prefix: &str, node_types_path: &Path) -> std::io::Result<NodeTypeMap> {