don't generate default with getter

This commit is contained in:
2024-08-18 18:28:29 +02:00
parent 0e59545f92
commit 903a3c7589
2 changed files with 16 additions and 2 deletions

View File

@ -28,6 +28,17 @@ struct Config {
field: Cell<i32>,
}
#[config]
struct WithSetterAndDefault {
#[config(
default = "42",
typ = "i32",
get = "Cell::get",
set = "set_cell::<{i32::MIN}, {i32::MAX}>"
)]
field: Cell<i32>,
}
#[test]
fn get() {
let mut buffer = [0u8; 32];