From 4005c3c6305977060322e4846c84775ecc7155f1 Mon Sep 17 00:00:00 2001 From: Andreas Reich Date: Wed, 24 Jan 2024 11:43:47 +0100 Subject: [PATCH] Fix code-example gen causing clippy warnings on windows (#4897) And fix broken autogen warning. ### Checklist * [x] I have read and agree to [Contributor Guide](https://github.com/rerun-io/rerun/blob/main/CONTRIBUTING.md) and the [Code of Conduct](https://github.com/rerun-io/rerun/blob/main/CODE_OF_CONDUCT.md) * [x] I've included a screenshot or gif (if applicable) * [x] I have tested the web demo (if applicable): * Using newly built examples: [app.rerun.io](https://app.rerun.io/pr/4897/index.html) * Using examples from latest `main` build: [app.rerun.io](https://app.rerun.io/pr/4897/index.html?manifest_url=https://app.rerun.io/version/main/examples_manifest.json) * Using full set of examples from `nightly` build: [app.rerun.io](https://app.rerun.io/pr/4897/index.html?manifest_url=https://app.rerun.io/version/nightly/examples_manifest.json) * [x] The PR title and labels are set such as to maximize their usefulness for the next release's CHANGELOG - [PR Build Summary](https://build.rerun.io/pr/4897) - [Docs preview](https://rerun.io/preview/9497fbee4c374f63d8909f3e63d9d15922d8aac3/docs) - [Examples preview](https://rerun.io/preview/9497fbee4c374f63d8909f3e63d9d15922d8aac3/examples) - [Recent benchmark results](https://build.rerun.io/graphs/crates.html) - [Wasm size tracking](https://build.rerun.io/graphs/sizes.html) --- docs/code-examples/build.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/code-examples/build.rs b/docs/code-examples/build.rs index 43b70a3f426b..0834fb1e91e7 100644 --- a/docs/code-examples/build.rs +++ b/docs/code-examples/build.rs @@ -42,7 +42,9 @@ fn main() { "let args = _args;", ); let contents = format!( - "//! DO NOT EDIT! This is a py. The original is in {path:?}.\n{contents}" + "//! DO NOT EDIT! This file was autogenerated by `{}`. The original is in `{}`.\n{contents}", + file!().replace('\\', "/"), + path.to_str().unwrap().replace('\\', "/"), ); let target_path = examples_path.join(format!("{example_name}.rs"));