Fix clippy errors
ci/woodpecker/push/tests Pipeline was successful

This commit is contained in:
2026-07-31 20:39:50 +00:00
parent 8c53bc0e20
commit a29051b0e4
3 changed files with 6 additions and 9 deletions
-1
View File
@@ -20,7 +20,6 @@ pub struct ReviewResult {
pub struct ReviewItem {
pub filename: String,
pub line: Option<u64>,
pub code: String,
pub message: String,
}
-7
View File
@@ -197,7 +197,6 @@ pub struct ReviewPayload {
#[derive(Deserialize, Debug)]
pub struct PullRequest {
pub id: u64,
pub diff_url: String,
pub number: u64,
pub title: String,
@@ -207,12 +206,10 @@ pub struct PullRequest {
pub struct Comment {
pub id: u64,
pub body: String,
pub user: User,
}
#[derive(Deserialize, Debug)]
pub struct User {
pub id: u64,
pub login: String,
}
@@ -282,10 +279,8 @@ mod tests {
match result.unwrap() {
WebhookType::Review(payload) => {
assert_eq!(payload.action, "created");
assert_eq!(payload.pull_request.id, 42);
assert_eq!(payload.comment.id, 7);
assert_eq!(payload.comment.body, "@test_bot LGTM");
assert_eq!(payload.comment.user.id, 100);
}
}
}
@@ -375,10 +370,8 @@ mod tests {
let payload: ReviewPayload = serde_json::from_value(json).unwrap();
assert_eq!(payload.action, "created");
assert_eq!(payload.pull_request.id, 99);
assert_eq!(payload.comment.id, 12);
assert_eq!(payload.comment.body, "Needs work");
assert_eq!(payload.comment.user.id, 200);
}
#[test]