Skip to content

Commit 5c3a0db

Browse files
committed
Fixed a bug: ignores :inlined attribute on models which are not inside another sequence.
1 parent 2b2d0cd commit 5c3a0db

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/minimallist/core.cljc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@
124124
((-> (:coll-type model :any) {:any any?
125125
:list list?
126126
:vector vector?}) data)
127-
(some nil? (left-overs context model (seq data)))
127+
(some nil? (left-overs context (dissoc model :inlined) (seq data)))
128128
(implies (contains? model :count-model)
129129
(-valid? context (:count-model model) (count data)))
130130
(implies (contains? model :condition-model)

src/minimallist/generator.cljc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -479,7 +479,7 @@
479479
(:cat :repeat) (cond->> (gen/bind gen/boolean
480480
(fn [random-bool]
481481
(let [budget (max 0 (dec budget)) ; the collection itself costs 1
482-
gen (sequence-generator context model budget)
482+
gen (sequence-generator context (dissoc model :inlined) budget)
483483
inside-list? (case (:coll-type model)
484484
:list true
485485
:vector false

0 commit comments

Comments
 (0)