Skip to content

Commit f3e5e88

Browse files
committed
Add a warning to the Cargo.toml to discourage modifications
1 parent bd6db29 commit f3e5e88

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

top-crates/src/main.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,5 +111,14 @@ fn main() {
111111

112112
fn write_manifest(manifest: TomlManifest, path: impl AsRef<Path>) {
113113
let content = toml::to_string(&manifest).expect("Couldn't serialize TOML");
114+
115+
let disclaimer = "# This file is automatically @generated by the top-crates script.
116+
# Do not edit it manually. Any pull requests changing this file will likely be closed.
117+
# See https://github.com/rust-lang/rust-playground/blob/main/CRATE_POLICY.md for details.
118+
#
119+
";
120+
121+
let content = disclaimer.to_string() + &content;
122+
114123
fs::write(path, content).expect("Couldn't write Cargo.toml");
115124
}

0 commit comments

Comments
 (0)