Commit 2a93b52e9f

2a93b52e9ff869fc1b69ab8876bdb5002577b37e

parent: 799862c106

Unsigned

Damir Jelić <poljar@termina.org.uk> · 2020-06-27 12:56 UTC

config: Use ranges to declare the min/max integer option values.

Layout: unified · split

src/config.rs +2 −3
@@ -171,7 +171,7 @@ macro_rules! option {
171171 option_getter!(Boolean, $option_name, bool);
172172 };
173173
174 (Integer, $option_name:ident, $description:literal, $default:literal, $min:literal, $max:literal) => {
174 (Integer, $option_name:ident, $description:literal, $default:literal, $min:literal..$max:literal) => {
175175 integer_create!($option_name, $description, $default, $min, $max, []);
176176 option_getter!(Integer, $option_name, i64);
177177 };
@@ -303,8 +303,7 @@ config!(
303303 int_test: Integer {
304304 "test",
305305 5,
306 0,
307 10
306 0..10
308307 },
309308 enum_test: Enum {
310309 "test",