Opened 2 years ago

Closed 2 years ago

#27844 closed defect (fixed)

rerun rustfmt

Reported by: cyberpunks Owned by:
Priority: Medium Milestone: Tor: unspecified
Component: Core Tor/Tor Version: Tor: 0.3.5.1-alpha
Severity: Normal Keywords: rust
Cc: Actual Points:
Parent ID: Points:
Reviewer: catalyst Sponsor:

Description


Child Tickets

Change History (10)

comment:2 Changed 2 years ago by dgoulet

Keywords: rust added
Milestone: Tor: unspecified
Status: newneeds_review

comment:3 Changed 2 years ago by dgoulet

Reviewer: teor

comment:4 Changed 2 years ago by dgoulet

Reviewer: teorcatalyst

comment:6 Changed 2 years ago by catalyst

Status: needs_reviewneeds_information

I get this additional diff when running make rustfmt on the pull request. Any ideas why the discrepancy is there? Is this just version skew given a newer rustfmt?

diff --git a/src/rust/protover/protoset.rs b/src/rust/protover/protoset.rs
index 3bfa781..5b2367b 100644
--- a/src/rust/protover/protoset.rs
+++ b/src/rust/protover/protoset.rs
@@ -273,8 +273,8 @@ impl ProtoSet {
             let excluded_ranges = other
                 .iter()
                 .cloned() // have to be owned tuples, to match iter::once(the_end).
-                .skip_while(move|&(_, hi2)| hi2 < lo) // skip the non-overlapping ranges.
-                .take_while(move|&(lo2, _)| lo2 <= hi) // take all the overlapping ones.
+                .skip_while(move |&(_, hi2)| hi2 < lo) // skip the non-overlapping ranges.
+                .take_while(move |&(lo2, _)| lo2 <= hi) // take all the overlapping ones.
                 .chain(iter::once(the_end));
 
             let mut nextlo = lo;

comment:7 Changed 2 years ago by nickm

For part of the review here, we should vconfirm that running 'make rustfmt' on the version right before the changes gives the same result as the changed version.

comment:8 Changed 2 years ago by nickm

(or if not the same result, almost the same result)

comment:9 Changed 2 years ago by catalyst

Status: needs_informationmerge_ready

Ran make rusfmt on the parent commit of the patch, and confirmed that the only difference was the small cosmetic difference I already commented on.

comment:10 Changed 2 years ago by nickm

Resolution: fixed
Status: merge_readyclosed

merged!

Note: See TracTickets for help on using tickets.