mirror of
https://seed.radicle.dev/rad:z4V1sjrXqjvFdnCUbxPFqd5p4DtH5.git
synced 2026-11-29 18:20:30 +08:00
http: Apply warnings from clippy
This commit is contained in:
@@ -13,7 +13,7 @@ impl<'a> Diff<'a> {
|
||||
pub fn as_json(&self) -> Value {
|
||||
let s = self.0.stats();
|
||||
json!({
|
||||
"files": self.0.files().into_iter().map(|f| {
|
||||
"files": self.0.files().map(|f| {
|
||||
match f {
|
||||
surf::diff::FileDiff::Added(added) => json!({
|
||||
"status": "added",
|
||||
@@ -142,7 +142,7 @@ impl<'a> DiffContent<'a> {
|
||||
surf::diff::DiffContent::Plain { hunks, stats, eof } => {
|
||||
let hunks = hunks
|
||||
.iter()
|
||||
.map(|h| Hunk::new(&h).as_json())
|
||||
.map(|h| Hunk::new(h).as_json())
|
||||
.collect::<Vec<_>>();
|
||||
|
||||
json!({
|
||||
@@ -233,7 +233,7 @@ impl<'a> Hunk<'a> {
|
||||
.0
|
||||
.lines
|
||||
.iter()
|
||||
.map(|line| Modification::new(&line).as_json())
|
||||
.map(|line| Modification::new(line).as_json())
|
||||
.collect::<Vec<_>>();
|
||||
|
||||
json!({
|
||||
|
||||
Reference in New Issue
Block a user