Skip to content

Commit

Permalink
Fix clippy warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
senekor committed Nov 1, 2023
1 parent 65a5355 commit 5a6aaab
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 12 deletions.
2 changes: 1 addition & 1 deletion src/cargo_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ pub struct TestEvent {
mod test {
use super::*;

const TEST_DATA: &'static str = r#"
const TEST_DATA: &str = r#"
{ "type": "suite", "event": "started", "test_count": 2 }
{ "type": "test", "event": "started", "name": "test::fail" }
{ "type": "test", "event": "started", "name": "test::pass" }
Expand Down
11 changes: 1 addition & 10 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,16 +66,7 @@ where
mod test {
use super::*;

#[test]
fn pass() {}

#[test]
#[ignore]
fn fail() {
assert!(false);
}

const TEST_DATA: &'static str = r#"
const TEST_DATA: &str = r#"
{ "type": "suite", "event": "started", "test_count": 3 }
{ "type": "test", "event": "started", "name": "cargo_test::test::test_parse_events" }
{ "type": "test", "event": "started", "name": "test::fail" }
Expand Down
2 changes: 1 addition & 1 deletion src/test_name_formatter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
/// #### Why is this important?
/// See [Long test names and test-summaries have visible overflow #6544](https://github.com/exercism/exercism/issues/6544)
pub fn format_test_name(name: String) -> String {
let name = name.to_lowercase().replace("_", " ");
let name = name.to_lowercase().replace('_', " ");
let mut name: Vec<_> = name.split_whitespace().collect();
if name[0] == "test" {
name.remove(0);
Expand Down

0 comments on commit 5a6aaab

Please sign in to comment.