Skip to content

Commit

Permalink
- remove: unused default variable
Browse files Browse the repository at this point in the history
  • Loading branch information
RavenX8 committed Nov 28, 2024
1 parent 995e3c4 commit 8382ca6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions generator/src/codegen/rust/codegen_source.rs
Original file line number Diff line number Diff line change
Expand Up @@ -217,10 +217,10 @@ impl<'a, W: Write> CodeSourceGenerator<'a, W> {
let bits = elem.bits().map_or_else(|| "".to_string(), |b| format!(" : {}", b));
(rust_type.to_owned(), bits)
};
let default = match elem.init() {
self::ElementInitValue::Default(d) => " = ".to_string() + d,
_ => "".to_string()
};
// let default = match elem.init() {
// self::ElementInitValue::Default(d) => " = ".to_string() + d,
// _ => "".to_string()
// };
// cg!(self, "{}: {}{}{},", elem.name(), type_, bits, default);
cg!(self, "{}: {}{},", elem.name(), type_, bits);
Ok(())
Expand Down

0 comments on commit 8382ca6

Please sign in to comment.