Skip to content

Incorrectly adding TODO for function body for questions that don't start with a function body #63

@c-git

Description

@c-git

Describe the bug

In the below example it adds todo!("Fill in body") as if it was a function body but it's not. This is not valid rust code and thus cannot be formatted.

//! Solution for https://leetcode.com/problems/implement-stack-using-queues
//! 225. Implement Stack using Queues

struct MyStack { todo!("Fill in body") }

Leetcode problem

https://leetcode.com/problems/implement-stack-using-queues

To Reproduce

cargo leet gen https://leetcode.com/problems/implement-stack-using-queues

Error Message

N/A

Expected behavior

The todo is not added to the struct body

Environment Info:

  • Cargo Version: cargo 1.71.1 (7f1d04c00 2023-07-29)

Additional context

N/A

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions