Explorar o código

serde does not deserialize null as if it was default

Mark Rousskov %!s(int64=3) %!d(string=hai) anos
pai
achega
aacce662f5
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/github.rs

+ 1 - 1
src/github.rs

@@ -245,7 +245,7 @@ pub struct PullRequestDetails {
 #[derive(Debug, serde::Deserialize)]
 pub struct Issue {
     pub number: u64,
-    #[serde(default)]
+    #[serde(deserialize_with = "opt_string")]
     pub body: String,
     created_at: chrono::DateTime<Utc>,
     pub updated_at: chrono::DateTime<Utc>,