Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lint for &Dom<T> arguments #25438

Open
jdm opened this issue Jan 6, 2020 · 2 comments
Open

Lint for &Dom<T> arguments #25438

jdm opened this issue Jan 6, 2020 · 2 comments
Labels

Comments

@jdm
Copy link
Member

@jdm jdm commented Jan 6, 2020

There's no benefit to using &Dom<T> instead of &T function arguments. However, when we tried to add that lint in #25354, we discovered

type Handle = Dom<Node>;
and
fn get_template_contents(&mut self, target: &Dom<Node>) -> Dom<Node> {
which make it challenging to change.

@jdm jdm added the A-mach label Jan 6, 2020
@highfive
Copy link

@highfive highfive commented Jan 6, 2020

@jdm
Copy link
Member Author

@jdm jdm commented Jan 6, 2020

I wonder if TreeSink could have a second associated type for HandleArg with a constraint that allows converting from Handle to HandleArg.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.