Skip to content

Commit 0938d37

Browse files
tesujitopecongiro
authored andcommitted
use let to bind value from a macro expression (#3976)
1 parent 21a49c7 commit 0938d37

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/config/config_type.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ macro_rules! create_config {
325325
pub fn is_default(&self, key: &str) -> bool {
326326
match key {
327327
$(
328-
stringify!($i) => self.$i.1 && self.$i.2 == $def,
328+
stringify!($i) => self.$i.1 && { let default = $def; self.$i.2 == default},
329329
)+
330330
_ => false,
331331
}

0 commit comments

Comments
 (0)