Skip to content

Commit 4d1cbc1

Browse files
committed
Fix clippy::single_char_pattern
1 parent c199fbf commit 4d1cbc1

File tree

3 files changed

+14
-14
lines changed

3 files changed

+14
-14
lines changed

tests/display/util.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ use regex::Regex;
1212
use std::{fmt::Debug, sync::Arc};
1313

1414
pub fn strip_leading_trailing_braces(input: &str) -> &str {
15-
assert!(input.starts_with("{"));
16-
assert!(input.ends_with("}"));
15+
assert!(input.starts_with('{'));
16+
assert!(input.ends_with('}'));
1717

1818
&input[1..input.len() - 1]
1919
}

tests/logging_db/util.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ pub fn logging_db_output_sufficient(
3030
goals: Vec<(&str, Vec<SolverChoice>, TestGoal)>,
3131
) {
3232
println!("program {}", program_text);
33-
assert!(program_text.starts_with("{"));
34-
assert!(program_text.ends_with("}"));
33+
assert!(program_text.starts_with('{'));
34+
assert!(program_text.ends_with('}'));
3535

3636
let goals = goals
3737
.iter()
@@ -53,8 +53,8 @@ pub fn logging_db_output_sufficient(
5353
println!("----------------------------------------------------------------------");
5454
println!("---- first run on original test code ---------------------------------");
5555
println!("goal {}", goal_text);
56-
assert!(goal_text.starts_with("{"));
57-
assert!(goal_text.ends_with("}"));
56+
assert!(goal_text.starts_with('{'));
57+
assert!(goal_text.ends_with('}'));
5858
let goal = lower_goal(
5959
&*chalk_parse::parse_goal(&goal_text[1..goal_text.len() - 1]).unwrap(),
6060
&*program,
@@ -95,8 +95,8 @@ pub fn logging_db_output_sufficient(
9595
println!("----------------------------------------------------------------------");
9696
println!("---- second run on code output by logger -----------------------------");
9797
println!("goal {}", goal_text);
98-
assert!(goal_text.starts_with("{"));
99-
assert!(goal_text.ends_with("}"));
98+
assert!(goal_text.starts_with('{'));
99+
assert!(goal_text.ends_with('}'));
100100
let goal = lower_goal(
101101
&*chalk_parse::parse_goal(&goal_text[1..goal_text.len() - 1]).unwrap(),
102102
&*new_program,

tests/test/mod.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -243,8 +243,8 @@ fn solve_goal(
243243
) {
244244
with_tracing_logs(|| {
245245
println!("program {}", program_text);
246-
assert!(program_text.starts_with("{"));
247-
assert!(program_text.ends_with("}"));
246+
assert!(program_text.starts_with('{'));
247+
assert!(program_text.ends_with('}'));
248248

249249
let mut db = ChalkDatabase::with(
250250
&program_text[1..program_text.len() - 1],
@@ -294,8 +294,8 @@ fn solve_goal(
294294
chalk_integration::tls::set_current_program(&program, || {
295295
println!("----------------------------------------------------------------------");
296296
println!("goal {}", goal_text);
297-
assert!(goal_text.starts_with("{"));
298-
assert!(goal_text.ends_with("}"));
297+
assert!(goal_text.starts_with('{'));
298+
assert!(goal_text.ends_with('}'));
299299
let goal = lower_goal(
300300
&*chalk_parse::parse_goal(&goal_text[1..goal_text.len() - 1]).unwrap(),
301301
&*program,
@@ -377,8 +377,8 @@ fn solve_aggregated(
377377
chalk_integration::tls::set_current_program(&program, || {
378378
println!("----------------------------------------------------------------------");
379379
println!("goal {}", goal_text);
380-
assert!(goal_text.starts_with("{"));
381-
assert!(goal_text.ends_with("}"));
380+
assert!(goal_text.starts_with('{'));
381+
assert!(goal_text.ends_with('}'));
382382
let goal = lower_goal(
383383
&*chalk_parse::parse_goal(&goal_text[1..goal_text.len() - 1]).unwrap(),
384384
&*program,

0 commit comments

Comments
 (0)