nouveau/headers: Drop double-underscore from Rust names
There are a couple of these in thea headers and they cause Rust to throw warnings. Just fix them instead of disabling the Rust warning. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34136>
This commit is contained in:
committed by
Marge Bot
parent
51da40d0db
commit
e58dd75c0f
@@ -369,7 +369,7 @@ class Field(object):
|
||||
elif name[0].isdigit():
|
||||
return '_' + name
|
||||
else:
|
||||
return name
|
||||
return re.sub(r'_+', '_', name)
|
||||
|
||||
class Method(object):
|
||||
def __init__(self, name, addr, is_array=False):
|
||||
@@ -520,7 +520,6 @@ def main():
|
||||
f.write(TEMPLATE_RS.render(**environment))
|
||||
if args.out_rs_mthd is not None:
|
||||
with open(args.out_rs_mthd, 'w', encoding='utf-8') as f:
|
||||
f.write("#![allow(non_snake_case)]\n")
|
||||
f.write("use crate::Mthd;\n")
|
||||
f.write("use crate::ArrayMthd;\n")
|
||||
f.write("\n")
|
||||
|
||||
Reference in New Issue
Block a user