Skip to content

Commit

Permalink
Merge pull request #869 from apohrebniak/derive-type-hints
Browse files Browse the repository at this point in the history
Add missing type hints in fields codegen
  • Loading branch information
Urhengulas authored Oct 16, 2024
2 parents 8fbaec9 + 2f8e108 commit afebfc5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
- [#874]: `defmt`: Fix doc test
- [#872]: `defmt`: Add `expect!` as alias for `unwrap!` for discoverability
- [#871]: Set MSRV to Rust 1.76
- [#869]: `macros`: Add missing type hints
- [#865]: `defmt`: Replace proc-macro-error with proc-macro-error2
- [#859]: `defmt`: Satisfy clippy
- [#858]: `defmt`: Implement "passthrough" trait impls for *2Format wrappers
Expand All @@ -27,6 +28,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
[#874]: https://github.com/knurling-rs/defmt/pull/874
[#872]: https://github.com/knurling-rs/defmt/pull/872
[#871]: https://github.com/knurling-rs/defmt/pull/871
[#869]: https://github.com/knurling-rs/defmt/pull/869
[#859]: https://github.com/knurling-rs/defmt/pull/859
[#858]: https://github.com/knurling-rs/defmt/pull/858
[#857]: https://github.com/knurling-rs/defmt/pull/857
Expand Down
4 changes: 2 additions & 2 deletions macros/src/derives/format/codegen/fields.rs
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,8 @@ fn as_native_type(ty: &Type) -> Option<String> {
let ty_name = ident.to_string();

match &*ty_name {
"u8" | "u16" | "u32" | "usize" | "i8" | "i16" | "i32" | "isize" | "f32" | "f64"
| "bool" | "str" => Some(ty_name),
"u8" | "u16" | "u32" | "u64" | "u128" | "usize" | "i8" | "i16" | "i32" | "i64"
| "i128" | "isize" | "f32" | "f64" | "bool" | "str" => Some(ty_name),
_ => None,
}
}
Expand Down

0 comments on commit afebfc5

Please sign in to comment.