[PATCH v5 08/13] scripts: generate_rust_analyzer.py: use str(pathlib.Path)

Tamir Duberstein
2025-03-25T20:06:53Z

Use the `/` operator on `pathlib.Path` rather than directly crafting a
string. This is consistent with all other path manipulation in this
script.

Reviewed-by: Fiona Behrens <me@kloenk.dev>
Reviewed-by: Daniel Almeida <daniel.almeida@collabora.com>
Tested-by: Daniel Almeida <daniel.almeida@collabora.com>
Signed-off-by: Tamir Duberstein <tamird@gmail.com>
---
scripts/generate_rust_analyzer.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/generate_rust_analyzer.py b/scripts/generate_rust_analyzer.py
index badcef4126cf..5370563688eb 100755
--- a/scripts/generate_rust_analyzer.py
+++ b/scripts/generate_rust_analyzer.py
@@ -141,7 +141,7 @@ def generate_crates(
proc_macro_crate: ProcMacroCrate = {
**crate,
"is_proc_macro": True,
- "proc_macro_dylib_path": f"{objtree}/rust/{proc_macro_dylib_name}",
+ "proc_macro_dylib_path": str(objtree / "rust" / proc_macro_dylib_name),
}
register_crate(proc_macro_crate)

--
2.49.0