mirror of
https://github.com/tealdeer-rs/tealdeer.git
synced 2026-08-09 09:49:10 +02:00
Fix clippy lints on all targets (#481)
This commit is contained in:
parent
4d33e8a279
commit
d0108b23e4
3 changed files with 6 additions and 5 deletions
2
.github/workflows/ci.yml
vendored
2
.github/workflows/ci.yml
vendored
|
|
@ -56,7 +56,7 @@ jobs:
|
|||
toolchain: stable
|
||||
components: clippy
|
||||
- name: run clippy lints
|
||||
run: cargo clippy --features logging
|
||||
run: cargo clippy --all-targets --features logging
|
||||
|
||||
fmt:
|
||||
name: run rustfmt
|
||||
|
|
|
|||
|
|
@ -439,7 +439,7 @@ mod tests {
|
|||
#[test]
|
||||
fn placeholder_inside_escaped() {
|
||||
assert_eq!(
|
||||
run("test", r#"test \{\{{{var}} normal\}\}"#),
|
||||
run("test", r"test \{\{{{var}} normal\}\}"),
|
||||
[
|
||||
CommandName("test"),
|
||||
NormalCode(" {{"),
|
||||
|
|
@ -450,10 +450,10 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
/// Regression test for https://github.com/tealdeer-rs/tealdeer/issues/473
|
||||
/// Regression test for <https://github.com/tealdeer-rs/tealdeer/issues/473>
|
||||
fn prefix_check_character_boundary() {
|
||||
assert_eq!("Ä".len(), 2);
|
||||
assert_eq!(run("", r#"Äxx{{x}}"#), [NormalCode("Äxx"), Variable("x")],);
|
||||
assert_eq!(run("", r"Äxx{{x}}"), [NormalCode("Äxx"), Variable("x")],);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -555,7 +555,7 @@ fn test_cache_location_permission_denied() {
|
|||
// Make cache directory unreadable
|
||||
let cache_dir = testenv.cache_dir();
|
||||
let mut permissions = cache_dir.metadata().unwrap().permissions();
|
||||
permissions.set_mode(0);
|
||||
permissions.set_mode(0o0);
|
||||
fs::set_permissions(cache_dir, permissions).unwrap();
|
||||
|
||||
testenv
|
||||
|
|
@ -1047,6 +1047,7 @@ fn test_search_language_precedence() {
|
|||
testenv.add_lang_entry(lang, lang, "");
|
||||
}
|
||||
|
||||
#[expect(clippy::type_complexity)]
|
||||
let run = |cases: &[(Vec<(&str, &str)>, Vec<&str>, &str)]| {
|
||||
for (extra_env, extra_args, expected) in cases {
|
||||
let mut cmd = testenv.command();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue