Formatting.
Some checks failed
Matrix / Format (pull_request) Successful in 3s
Matrix / Clippy check (pull_request) Failing after 8s
Matrix / Build - nightly (pull_request) Successful in 7s
Matrix / Build - stable (pull_request) Successful in 7s
Matrix / Test - beta (pull_request) Successful in 7s
Matrix / Test - nightly (pull_request) Successful in 8s
Matrix / Test - stable (pull_request) Successful in 8s
Matrix / Build - beta (pull_request) Successful in 18s
Some checks failed
Matrix / Format (pull_request) Successful in 3s
Matrix / Clippy check (pull_request) Failing after 8s
Matrix / Build - nightly (pull_request) Successful in 7s
Matrix / Build - stable (pull_request) Successful in 7s
Matrix / Test - beta (pull_request) Successful in 7s
Matrix / Test - nightly (pull_request) Successful in 8s
Matrix / Test - stable (pull_request) Successful in 8s
Matrix / Build - beta (pull_request) Successful in 18s
This commit is contained in:
@@ -29,31 +29,24 @@ impl TypeGenerationContext {
|
|||||||
|
|
||||||
if !self.available_constructors.is_empty() {
|
if !self.available_constructors.is_empty() {
|
||||||
for name in self.available_constructors.iter() {
|
for name in self.available_constructors.iter() {
|
||||||
leaf_options.push(Type::Constructor(
|
leaf_options.push(Type::Constructor(Location::manufactured(), name.clone()));
|
||||||
Location::manufactured(),
|
|
||||||
name.clone(),
|
|
||||||
));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if !self.available_variables.is_empty() {
|
if !self.available_variables.is_empty() {
|
||||||
for name in self.available_variables.iter() {
|
for name in self.available_variables.iter() {
|
||||||
leaf_options.push(Type::Variable(
|
leaf_options.push(Type::Variable(Location::manufactured(), name.clone()));
|
||||||
Location::manufactured(),
|
|
||||||
name.clone(),
|
|
||||||
));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for prim in PRIMITIVE_TYPES.iter() {
|
for prim in PRIMITIVE_TYPES.iter() {
|
||||||
leaf_options.push(Type::Primitive(
|
leaf_options.push(Type::Primitive(
|
||||||
Location::manufactured(),
|
Location::manufactured(),
|
||||||
Name::new(Location::manufactured(), prim.to_string()),
|
Name::new(Location::manufactured(), prim.to_string()),
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
if depth < MAXIMUM_TYPE_DEPTH && runner.rng().random_bool(0.5) {
|
if depth < MAXIMUM_TYPE_DEPTH && runner.rng().random_bool(0.5) {}
|
||||||
}
|
|
||||||
|
|
||||||
let index = runner.rng().random_range(0..leaf_options.len());
|
let index = runner.rng().random_range(0..leaf_options.len());
|
||||||
leaf_options.remove(index)
|
leaf_options.remove(index)
|
||||||
|
|||||||
Reference in New Issue
Block a user