mirror of
https://github.com/servo/servo.git
synced 2025-07-23 07:13:52 +01:00
Stop using the deprecated range function.
This commit is contained in:
parent
c4b7979450
commit
4d41f1c991
17 changed files with 27 additions and 28 deletions
|
@ -1049,7 +1049,7 @@ class CGArgumentConverter(CGThing):
|
|||
|
||||
variadicConversion = string.Template(
|
||||
"let mut vector: ${seqType} = Vec::with_capacity((${argc} - ${index}) as usize);\n"
|
||||
"for variadicArg in range(${index}, ${argc}) {\n"
|
||||
"for variadicArg in ${index}..${argc} {\n"
|
||||
"${inner}\n"
|
||||
" vector.push(slot);\n"
|
||||
"}\n"
|
||||
|
@ -5157,7 +5157,7 @@ class CallbackMember(CGNativeMember):
|
|||
successCode="")
|
||||
if arg.variadic:
|
||||
conversion = string.Template(
|
||||
"for idx in range(0, ${arg}.len()) {\n" +
|
||||
"for idx in 0..${arg}.len() {\n" +
|
||||
CGIndenter(CGGeneric(conversion)).define() + "\n"
|
||||
"}"
|
||||
).substitute({ "arg": arg.identifier.name })
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue