Skip to content

Commit 437b333

Browse files
committed
fix: Remove unnecessary text in generated script
1 parent 0b348f3 commit 437b333

File tree

1 file changed

+0
-12
lines changed

1 file changed

+0
-12
lines changed

script-gen-manager/src/script_component/function.rs

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -110,12 +110,6 @@ pub trait FunctionModel: Send + Sync {
110110
///
111111
/// * `script_buffer` - A mutable reference to the script buffer.
112112
fn build(&mut self, script_buffer: &mut ScriptBuffer) {
113-
let chunk_name = script_buffer.get_unique_name(format!("_{}", self.get_type()));
114-
self.start_chunk(script_buffer);
115-
116-
script_buffer.body_append(format!("function {}()\n", chunk_name));
117-
script_buffer.change_indent(ScriptBuffer::DEFAULT_INDENT);
118-
119113
let metadata = self.get_metadata();
120114
let val_replacement_map = self.get_val_replacement_map();
121115

@@ -128,12 +122,6 @@ pub trait FunctionModel: Send + Sync {
128122
}
129123
}
130124
}
131-
132-
script_buffer.change_indent(-ScriptBuffer::DEFAULT_INDENT);
133-
script_buffer.body_append("end".to_owned());
134-
135-
self.finish_chunk(script_buffer);
136-
script_buffer.postamble_append(format!("{}()", chunk_name));
137125
}
138126

139127
/// Formats a floating-point value.

0 commit comments

Comments
 (0)