aboutsummaryrefslogtreecommitdiff
path: root/helix-term/tests/test/helpers.rs
diff options
context:
space:
mode:
authorSkyler Hawthorne2022-10-23 02:18:32 +0000
committerMichael Davis2023-03-20 23:34:40 +0000
commit5b07ce76fcf1fc3279860f079b32213689f9eb4e (patch)
tree4a8a3233be6be9243a68d582c3583befa56929a5 /helix-term/tests/test/helpers.rs
parent8c5ec95ac0a8535060b9e0545e4c46f57aeccbfd (diff)
make TestCase::From more generic
Diffstat (limited to 'helix-term/tests/test/helpers.rs')
-rw-r--r--helix-term/tests/test/helpers.rs9
1 files changed, 7 insertions, 2 deletions
diff --git a/helix-term/tests/test/helpers.rs b/helix-term/tests/test/helpers.rs
index fb12ef12..59d08bb6 100644
--- a/helix-term/tests/test/helpers.rs
+++ b/helix-term/tests/test/helpers.rs
@@ -22,8 +22,13 @@ pub struct TestCase {
pub out_selection: Selection,
}
-impl<S: Into<String>> From<(S, S, S)> for TestCase {
- fn from((input, keys, output): (S, S, S)) -> Self {
+impl<S, R, V> From<(S, R, V)> for TestCase
+where
+ S: Into<String>,
+ R: Into<String>,
+ V: Into<String>,
+{
+ fn from((input, keys, output): (S, R, V)) -> Self {
let (in_text, in_selection) = test::print(&input.into());
let (out_text, out_selection) = test::print(&output.into());