Fix error while compiling rslib (#2187)

* protobuf generate error

pass --experimental_allow_proto3_optional to protoc
add missing dereive trait to struct Daylimit

* delete invalid derive trait Eq

* remove argument from protoc

--experimental_allow_proto3_optional
This commit is contained in:
dobefore 2022-11-09 10:36:23 +08:00 committed by GitHub
parent d902b00d0e
commit 0c9cecd7a3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -112,7 +112,7 @@ pub fn write_backend_proto_rs() {
)
.type_attribute(
"Deck.Normal.DayLimit",
"#[derive(Copy, serde_derive::Deserialize, serde_derive::Serialize)]",
"#[derive(Copy, Eq, serde_derive::Deserialize, serde_derive::Serialize)]",
)
.type_attribute("HelpPageLinkRequest.HelpPage", "#[derive(strum::EnumIter)]")
.type_attribute("CsvMetadata.Delimiter", "#[derive(strum::EnumIter)]")

View File

@ -22,7 +22,7 @@ pub struct ForeignData {
updated_tags: Vec<String>,
}
#[derive(Debug, Clone, PartialEq, Eq, Default, Serialize, Deserialize)]
#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)]
#[serde(default)]
pub struct ForeignNote {
guid: String,