Skip to content

Commit 7524d7c

Browse files
committed
Fix failure to deserialize FileDiff with missing patch field
1 parent 6792a75 commit 7524d7c

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)