Skip to content

Commit 194c1c3

Browse files
authored
Merge pull request #2018 from Urgau/empty_patch
Fix failure to deserialize `FileDiff` with missing `patch` field
2 parents 6792a75 + 7524d7c commit 194c1c3

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/github.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -330,6 +330,10 @@ pub struct FileDiff {
330330
/// The fullname path of the file.
331331
pub filename: String,
332332
/// The patch/diff for the file.
333+
///
334+
/// Can be empty when there isn't any changes to the content of the file
335+
/// (like when a file is renamed without it's content being modified).
336+
#[serde(default)]
333337
pub patch: String,
334338
}
335339

0 commit comments

Comments
 (0)