Skip to content

Commit

Permalink
Add support for compiler experimental features in `snforge-test-colle…
Browse files Browse the repository at this point in the history
…ctor`

commit-id:774bde45

revert previous commit

update snforge-test-collector

remove unused method
  • Loading branch information
tomek0123456789 committed Jan 5, 2024
1 parent 31e63c0 commit 8733f15
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions extensions/scarb-snforge-test-collector/src/metadata.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,24 +76,23 @@ impl CompilationUnit<'_> {
.components
.iter()
.map(|component| {
let pkg = self
.metadata
.get_package(&component.package)
.unwrap_or_else(|| panic!("Failed to find = {} package", &component.package));
(
SmolStr::from(&component.name),
CrateSettings {
edition: if let Some(edition) = self
.metadata
.get_package(&component.package)
.unwrap_or_else(|| {
panic!("Failed to find = {} package", component.package)
})
.edition
.clone()
{
edition: if let Some(edition) = pkg.edition.clone() {
let edition_value = serde_json::Value::String(edition);
serde_json::from_value(edition_value).unwrap()
} else {
Edition::default()
},
experimental_features: Default::default(),
experimental_features: serde_json::from_value(
pkg.experimental_features.clone().unwrap_or_default(),
)
.unwrap(),
},
)
})
Expand Down

0 comments on commit 8733f15

Please sign in to comment.