rustfmt: add trailing commas in match arms, set fn call to block stle (#85)
This commit is contained in:
committed by
Carl Lerche
parent
de1edf4873
commit
f7d14861e5
@@ -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 => {},
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user