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

fix into_f64 and into_isize #359

Merged
merged 2 commits into from
Sep 16, 2020
Merged

fix into_f64 and into_isize #359

merged 2 commits into from
Sep 16, 2020

Conversation

yshui
Copy link
Contributor

@yshui yshui commented Sep 16, 2020

askama passes references to the filters (e.g. &f64), and &f64 doesn't
implement NumCast, only f64 does.

So, the filters should take &T instead of T.

Signed-off-by: Yuxuan Shui yshuiv7@gmail.com

@djc
Copy link
Owner

djc commented Sep 16, 2020

Can you fix up the tests? Ideally we'd add an integration test for this too, to show that it works correctly.

askama passes references to the filters (e.g. &f64), and &f64 doesn't
implement NumCast, only f64 does.

So, the filters should take &T instead of T.

Fixes djc#357

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
@yshui
Copy link
Contributor Author

yshui commented Sep 16, 2020

Done

@djc
Copy link
Owner

djc commented Sep 16, 2020

Just a little formatting and then it can be merged. 👍

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
@yshui
Copy link
Contributor Author

yshui commented Sep 16, 2020

Formatted

@djc djc merged commit 121212b into djc:main Sep 16, 2020
@djc
Copy link
Owner

djc commented Sep 16, 2020

Thanks!

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

Successfully merging this pull request may close these issues.

None yet

2 participants