mirror of
https://github.com/tealdeer-rs/tealdeer.git
synced 2026-08-21 23:54:18 +02:00
Run clippy on stable with msrv setting instead of on msrv (#200)
This commit is contained in:
parent
123c809630
commit
d5d3d20451
5 changed files with 7 additions and 6 deletions
2
.github/workflows/ci.yml
vendored
2
.github/workflows/ci.yml
vendored
|
|
@ -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
1
clippy.toml
Normal file
|
|
@ -0,0 +1 @@
|
|||
msrv = "1.52"
|
||||
|
|
@ -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),
|
||||
|
|
|
|||
|
|
@ -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),
|
||||
|
|
|
|||
|
|
@ -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()))?;
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue