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

Putting semi-colon in doc comments in models causes the macro to panic #45

Open
Zk2u opened this issue Jun 28, 2024 · 0 comments
Open
Labels
bug Something isn't working

Comments

@Zk2u
Copy link

Zk2u commented Jun 28, 2024

Let's say we have the following.

#[charybdis_model(
    table_name = chefs,
    partition_keys = [id],
    clustering_keys = [],
    global_secondary_indexes = [email, phone],
    local_secondary_indexes = [],
    static_columns = []
)]
#[derive(Default, Serialize, Deserialize)]
pub struct Chef {
    /// Chef's unique; identifier. Immutable
    pub id: Uuid,
    pub email: Text,
    pub phone: Text,
}

The semi-colon in the doc comment for id will cause the charybdis_model to crash.

custom attribute panicked
message: called `Result::unwrap()` on an `Err` value: Error("cannot parse string into token stream")
@GoranBrkuljan GoranBrkuljan added the bug Something isn't working label Aug 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants