Skip to content
This repository was archived by the owner on Mar 11, 2025. It is now read-only.

Remove panic!() in loop.cycle([]) - #617

Merged
djc merged 1 commit into
askama-rs:mainfrom
Kijewski:pr-visit_call-no-panic
Jan 31, 2022
Merged

Remove panic!() in loop.cycle([])#617
djc merged 1 commit into
askama-rs:mainfrom
Kijewski:pr-visit_call-no-panic

Conversation

@Kijewski

Copy link
Copy Markdown
Member

No description provided.

djc
djc previously approved these changes Jan 31, 2022
Comment thread askama_shared/src/generator.rs Outdated
[arg] => {
if matches!(arg, Expr::Array(arr) if arr.is_empty()) {
panic!("loop.cycle(…) cannot use an empty array.");
return Err("loop.cycle(…) cannot use an empty array.".into());

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should also not end in a period (I do realize it was there already).

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I removed the period.

@Kijewski

Copy link
Copy Markdown
Member Author

Fixed one more typo in my change.

@djc
djc merged commit 84fe381 into askama-rs:main Jan 31, 2022
@Kijewski
Kijewski deleted the pr-visit_call-no-panic branch January 31, 2022 13:24
@djc djc mentioned this pull request Feb 26, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants