function definition style simplification
This commit is contained in:
parent
ed9d71f2c9
commit
47eead5ada
19 changed files with 231 additions and 64 deletions
|
@ -107,8 +107,12 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for ArrayIndexing {
|
|||
}
|
||||
|
||||
/// Returns an option containing a tuple with the start and end (exclusive) of the range.
|
||||
fn to_const_range(start: Option<Option<ConstVal>>, end: Option<Option<ConstVal>>, limits: RangeLimits, array_size: ConstInt)
|
||||
-> Option<(ConstInt, ConstInt)> {
|
||||
fn to_const_range(
|
||||
start: Option<Option<ConstVal>>,
|
||||
end: Option<Option<ConstVal>>,
|
||||
limits: RangeLimits,
|
||||
array_size: ConstInt
|
||||
) -> Option<(ConstInt, ConstInt)> {
|
||||
let start = match start {
|
||||
Some(Some(ConstVal::Integral(x))) => x,
|
||||
Some(_) => return None,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue