Skip to content
Snippets Groups Projects
Verified Commit bebd1b15 authored by João Magalhães's avatar João Magalhães :rocket:
Browse files

feat: improved vec write support

parent 80ed797e
No related branches found
No related tags found
No related merge requests found
Pipeline #2171 passed
......@@ -139,10 +139,15 @@ where
T: std::fmt::Display,
{
let mut list_str = String::new();
let mut is_first = true;
for value in &vec {
list_str.push_str(format!("\"{}\", ", value).as_str());
if is_first {
is_first = false;
} else {
list_str.push_str(", ");
}
list_str.push_str(format!("\"{}\"", value).as_str());
}
list_str.pop();
writeln!(
file,
"pub const {}: [{}; {}] = [{}];",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment