diff options
Diffstat (limited to 'scripts')
| -rwxr-xr-x | scripts/generate_rust_analyzer.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/scripts/generate_rust_analyzer.py b/scripts/generate_rust_analyzer.py index 38e834bd209e..024e71a742e0 100755 --- a/scripts/generate_rust_analyzer.py +++ b/scripts/generate_rust_analyzer.py @@ -313,9 +313,10 @@ def generate_crates( def is_root_crate(build_file: pathlib.Path, target: str) -> bool: try: - return f"{target}.o" in open(build_file).read() + contents = build_file.read_text() except FileNotFoundError: return False + return f"{target}.o" in contents # Then, the rest outside of `rust/`. # |
