Run clippy on stable with msrv setting instead of on msrv (#200)

This commit is contained in:
Niklas Mohrin 2021-08-17 19:40:35 +02:00 committed by GitHub
commit d5d3d20451
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 7 additions and 6 deletions

View file

@ -45,7 +45,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: 1.52
toolchain: stable
components: clippy
override: true
- uses: actions-rs/clippy-check@v1

1
clippy.toml Normal file
View file

@ -0,0 +1 @@
msrv = "1.52"

View file

@ -2,7 +2,7 @@ use reqwest::Error as ReqwestError;
use std::fmt;
#[derive(Debug)]
#[allow(clippy::pub_enum_variant_names)]
#[allow(clippy::enum_variant_names)]
pub enum TealdeerError {
CacheError(String),
ConfigError(String),

View file

@ -53,10 +53,10 @@ fn format_code(command: &str, text: &str, config: &Config) -> String {
let example_code = &between_variables[..variable_start];
let example_variable = &between_variables[variable_start + 2..];
highlight_command(&command, &example_code, &config, &mut parts);
highlight_command(command, example_code, config, &mut parts);
parts.push(config.style.example_variable.paint(example_variable));
} else {
highlight_command(&command, &between_variables, &config, &mut parts);
highlight_command(command, between_variables, config, &mut parts);
}
}
@ -98,7 +98,7 @@ where
.map_err(|e| WriteError(e.to_string()))?;
}
LineType::ExampleCode(text) => {
writeln!(writer, " {}", &format_code(&command, &text, &config))
writeln!(writer, " {}", &format_code(&command, &text, config))
.map_err(|e| WriteError(e.to_string()))?;
}
LineType::Other(text) => debug!("Unknown line type: {:?}", text),

View file

@ -100,7 +100,7 @@ fn print_page(
} else {
// Create tokenizer and print output
let mut tokenizer = Tokenizer::new(reader);
print_lines(&mut handle, &mut tokenizer, &config)
print_lines(&mut handle, &mut tokenizer, config)
.map_err(|e| format!("Could not write to stdout: {}", e.message()))?;
};
}