Clippy lints: https://rust-lang.github.io/rust-clippy/master/index.html#/struct_field_names
This is the current code:
#[rustversion::stable]
#[derive(Deserialize, PartialEq, Debug)]
pub struct Category {
pub category_id: CategoryId, // todo: rename to `id`
pub name: String,
pub num_torrents: u64,
}
#[rustversion::nightly]
#[derive(Deserialize, PartialEq, Debug)]
#[allow(clippy::struct_field_names)]
pub struct Category {
pub category_id: CategoryId, // todo: rename to `id`
pub name: String,
pub num_torrents: u64,
}
The field category_id should not be prefixed with the struct name.
NOTICE: the frontend type is also using the same name. So It must also be refactored there.