Skip to content

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

@Zk2u

Description

@Zk2u

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")

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions