Skip to content

Commit

Permalink
chore: fix clippy warns
Browse files Browse the repository at this point in the history
  • Loading branch information
giangndm committed Nov 17, 2024
1 parent 91bb326 commit 949baf4
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions bin/admin-panel/src/http/api/sync.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,11 @@ pub async fn sync_projects(query: Query<SyncProjectQuery>, data: Data<&HttpConte
.map(|p| {
let options: ProjectOptions = p
.options
.map(|o| serde_json::from_value(o).ok())
.flatten()
.and_then(|o| serde_json::from_value(o).ok())

Check warning on line 64 in bin/admin-panel/src/http/api/sync.rs

View check run for this annotation

Codecov / codecov/patch

bin/admin-panel/src/http/api/sync.rs#L64

Added line #L64 was not covered by tests
.unwrap_or_default();
let codecs: ProjectCodecs = p
.codecs
.map(|o| serde_json::from_value(o).ok())
.flatten()
.and_then(|o| serde_json::from_value(o).ok())

Check warning on line 68 in bin/admin-panel/src/http/api/sync.rs

View check run for this annotation

Codecov / codecov/patch

bin/admin-panel/src/http/api/sync.rs#L68

Added line #L68 was not covered by tests
.unwrap_or_default();
SyncProjectData {
app_id: p.id.clone(),
Expand Down

0 comments on commit 949baf4

Please sign in to comment.