Skip to content

Commit 2207b83

Browse files
committed
Rename ToParamName::into into ToParamName::into_param_name.
This trait is "internally" used but the `into` method may conflict with `Into` trait. We should see how not make it public, but renaming the method name is a faster workaround.
1 parent 824a2ee commit 2207b83

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

rustest-macro/src/utils.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ pub(crate) fn gen_param_fixture(
9595
where
9696
T: ::rustest::ToParamName<#param_type>
9797
{
98-
let (v, name) = inner.into();
98+
let (v, name) = inner.into_param_name();
9999
let name = format!(#test_name_format, name);
100100
Self{v, name}
101101
}

rustest/src/test_name.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,27 +56,27 @@ impl<T: ParamName> ParamName for Option<T> {
5656
}
5757

5858
pub trait ToParamName<T> {
59-
fn into(self) -> (T, String);
59+
fn into_param_name(self) -> (T, String);
6060
}
6161

6262
impl<T> ToParamName<T> for T
6363
where
6464
T: ParamName,
6565
{
66-
fn into(self) -> (T, String) {
66+
fn into_param_name(self) -> (T, String) {
6767
let name = self.param_name();
6868
(self, name)
6969
}
7070
}
7171

7272
impl<T> ToParamName<T> for (T, String) {
73-
fn into(self) -> (T, String) {
73+
fn into_param_name(self) -> (T, String) {
7474
self
7575
}
7676
}
7777

7878
impl<T> ToParamName<T> for (T, &str) {
79-
fn into(self) -> (T, String) {
79+
fn into_param_name(self) -> (T, String) {
8080
(self.0, self.1.to_owned())
8181
}
8282
}

0 commit comments

Comments
 (0)