Skip to content

Commit

Permalink
Use ink! release version in new contract template (#1896)
Browse files Browse the repository at this point in the history
* Use ink! release version in new contract template

* Update changelog

* chore: clippy
  • Loading branch information
davidsemakula authored Jan 23, 2025
1 parent 6f7671c commit 10cb226
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

[Unreleased]

### Changed
- Use ink! release version in new contract template - [1896](https://github.com/use-ink/cargo-contract/pull/1896)

## [5.0.2]

### Changed
Expand Down
6 changes: 2 additions & 4 deletions crates/build/src/workspace/manifest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ impl Manifest {
pub fn with_removed_crate_type(&mut self, crate_type: &str) -> Result<&mut Self> {
let crate_types = self.crate_types_mut()?;
if crate_type_exists(crate_type, crate_types) {
crate_types.retain(|v| v.as_str().map_or(true, |s| s != crate_type));
crate_types.retain(|v| v.as_str() != Some(crate_type));
}
Ok(self)
}
Expand Down Expand Up @@ -600,9 +600,7 @@ impl PathRewrite {
}

fn crate_type_exists(crate_type: &str, crate_types: &[value::Value]) -> bool {
crate_types
.iter()
.any(|v| v.as_str().map_or(false, |s| s == crate_type))
crate_types.iter().any(|v| v.as_str() == Some(crate_type))
}

fn merge_workspace_with_crate_dependencies(
Expand Down
4 changes: 2 additions & 2 deletions crates/build/templates/new/_Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ authors = ["[your_name] <[your_email]>"]
edition = "2021"

[dependencies]
ink = { version = "5.1.0", default-features = false }
ink = { version = "5.1.1", default-features = false }

[dev-dependencies]
ink_e2e = { version = "5.1.0" }
ink_e2e = { version = "5.1.1" }

[lib]
path = "lib.rs"
Expand Down

0 comments on commit 10cb226

Please sign in to comment.