We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 61b8b57 commit aa7401dCopy full SHA for aa7401d
src/cmds/edit.rs
@@ -121,7 +121,7 @@ if *lang == "rust" {
121
let cargo_path = Path::new(&cargo_path_str);
122
if !cargo_path.exists() {
123
let package_name = format!("prob-{}-{}", problem.fid, sanitized_slug);
124
- let cargo_content = format!(
+let cargo_content = format!(
125
r#"[package]
126
name = "{}"
127
version = "0.1.0"
@@ -131,9 +131,12 @@ edition = "2021"
131
path = "src/lib.rs"
132
133
[dependencies]
134
+# Uncomment and add crates as needed for LeetCode problems, e.g.:
135
+# itertools = "0.12"
136
+# regex = "1"
137
"#,
- package_name
- );
138
+ package_name
139
+);
140
let mut cargo_file = File::create(&cargo_path_str)?;
141
cargo_file.write_all(cargo_content.as_bytes())?;
142
}
0 commit comments