Run cargo fmt with reorder_impl_items set to true
This commit is contained in:
parent
faa5a10d20
commit
43df7dcb0e
@ -1139,6 +1139,7 @@ impl<'a> CommentReducer<'a> {
|
||||
|
||||
impl<'a> Iterator for CommentReducer<'a> {
|
||||
type Item = char;
|
||||
|
||||
fn next(&mut self) -> Option<Self::Item> {
|
||||
loop {
|
||||
let mut c = self.iter.next()?;
|
||||
|
@ -239,6 +239,7 @@ impl WidthHeuristics {
|
||||
single_line_if_else_max_width: 0,
|
||||
}
|
||||
}
|
||||
|
||||
// scale the default WidthHeuristics according to max_width
|
||||
pub fn scaled(max_width: usize) -> WidthHeuristics {
|
||||
let mut max_width_ratio: f32 = max_width as f32 / 100.0; // 100 is the default width -> default ratio is 1
|
||||
|
@ -799,9 +799,11 @@ mod test {
|
||||
fn bump(&mut self) {
|
||||
self.input.next().unwrap();
|
||||
}
|
||||
|
||||
fn eat(&mut self, c: char) {
|
||||
assert!(self.input.next().unwrap() == c);
|
||||
}
|
||||
|
||||
fn push_segment(
|
||||
result: &mut Vec<UseSegment>,
|
||||
buf: &mut String,
|
||||
@ -825,6 +827,7 @@ mod test {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fn parse_in_list(&mut self) -> UseTree {
|
||||
let mut result = vec![];
|
||||
let mut buf = String::new();
|
||||
|
@ -568,6 +568,7 @@ struct CharsIgnoreNewlineRepr<'a>(Peekable<Chars<'a>>);
|
||||
|
||||
impl<'a> Iterator for CharsIgnoreNewlineRepr<'a> {
|
||||
type Item = char;
|
||||
|
||||
fn next(&mut self) -> Option<char> {
|
||||
self.0.next().map(|c| {
|
||||
if c == '\r' {
|
||||
|
Loading…
x
Reference in New Issue
Block a user