mirror of
https://gitlab.com/veilid/veilid.git
synced 2025-03-30 17:48:03 -04:00
fix assert
This commit is contained in:
parent
2156449486
commit
a281f09d82
@ -128,8 +128,7 @@ extension DHTRecordDescriptorExt on DHTRecordDescriptor {
|
|||||||
|
|
||||||
@freezed
|
@freezed
|
||||||
class ValueSubkeyRange with _$ValueSubkeyRange {
|
class ValueSubkeyRange with _$ValueSubkeyRange {
|
||||||
@Assert('low < 0 || low > high', 'low out of range')
|
@Assert('low >= 0 && low <= high', 'range is invalid')
|
||||||
@Assert('high < 0', 'high out of range')
|
|
||||||
const factory ValueSubkeyRange({
|
const factory ValueSubkeyRange({
|
||||||
required int low,
|
required int low,
|
||||||
required int high,
|
required int high,
|
||||||
|
@ -903,8 +903,7 @@ class __$$ValueSubkeyRangeImplCopyWithImpl<$Res>
|
|||||||
@JsonSerializable()
|
@JsonSerializable()
|
||||||
class _$ValueSubkeyRangeImpl implements _ValueSubkeyRange {
|
class _$ValueSubkeyRangeImpl implements _ValueSubkeyRange {
|
||||||
const _$ValueSubkeyRangeImpl({required this.low, required this.high})
|
const _$ValueSubkeyRangeImpl({required this.low, required this.high})
|
||||||
: assert(low < 0 || low > high, 'low out of range'),
|
: assert(low >= 0 && low <= high, 'range is invalid');
|
||||||
assert(high < 0, 'high out of range');
|
|
||||||
|
|
||||||
factory _$ValueSubkeyRangeImpl.fromJson(Map<String, dynamic> json) =>
|
factory _$ValueSubkeyRangeImpl.fromJson(Map<String, dynamic> json) =>
|
||||||
_$$ValueSubkeyRangeImplFromJson(json);
|
_$$ValueSubkeyRangeImplFromJson(json);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user