Skip to content

Commit

Permalink
Sublist: use args in todo! instead of naming with _ (#2004)
Browse files Browse the repository at this point in the history
This necessitated adding `std::fmt::Debug` as a constraint to `T`. All
of the types in the tests are `i32` so this does not cause the tests to
break.

Corresponding forum post:
https://forum.exercism.org/t/warn-explain-or-remove-variables/15285
  • Loading branch information
ellnix authored Jan 29, 2025
1 parent d9d4d8d commit 0f32def
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions exercises/practice/sublist/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ pub enum Comparison {
Unequal,
}

pub fn sublist<T: PartialEq>(_first_list: &[T], _second_list: &[T]) -> Comparison {
todo!("Determine if the first list is equal to, sublist of, superlist of or unequal to the second list.");
pub fn sublist(first_list: &[i32], second_list: &[i32]) -> Comparison {
todo!("Determine if the {first_list:?} is equal to, sublist of, superlist of or unequal to {second_list:?}.");
}

0 comments on commit 0f32def

Please sign in to comment.