rustfmt: add trailing commas in match arms, set fn call to block stle (#85)

This commit is contained in:
Sean McArthur
2017-09-12 19:29:06 -07:00
committed by Carl Lerche
parent de1edf4873
commit f7d14861e5
37 changed files with 894 additions and 973 deletions

View File

@@ -109,38 +109,34 @@ impl Settings {
match Setting::load(raw) {
Some(HeaderTableSize(val)) => {
settings.header_table_size = Some(val);
}
Some(EnablePush(val)) => {
match val {
0 | 1 => {
settings.enable_push = Some(val);
}
_ => {
return Err(Error::InvalidSettingValue);
}
}
}
},
Some(EnablePush(val)) => match val {
0 | 1 => {
settings.enable_push = Some(val);
},
_ => {
return Err(Error::InvalidSettingValue);
},
},
Some(MaxConcurrentStreams(val)) => {
settings.max_concurrent_streams = Some(val);
}
Some(InitialWindowSize(val)) => {
if val as usize > MAX_INITIAL_WINDOW_SIZE {
return Err(Error::InvalidSettingValue);
} else {
settings.initial_window_size = Some(val);
}
}
},
Some(InitialWindowSize(val)) => if val as usize > MAX_INITIAL_WINDOW_SIZE {
return Err(Error::InvalidSettingValue);
} else {
settings.initial_window_size = Some(val);
},
Some(MaxFrameSize(val)) => {
if val < DEFAULT_MAX_FRAME_SIZE || val as usize > MAX_MAX_FRAME_SIZE {
return Err(Error::InvalidSettingValue);
} else {
settings.max_frame_size = Some(val);
}
}
},
Some(MaxHeaderListSize(val)) => {
settings.max_header_list_size = Some(val);
}
None => {}
},
None => {},
}
}