Skip to content

Commit

Permalink
Use latest edition for scarb new (#888)
Browse files Browse the repository at this point in the history
  • Loading branch information
maciektr authored Nov 9, 2023
1 parent 4574efd commit 70bad9a
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion examples/hello_world/Scarb.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "hello_world"
version = "0.1.0"
edition = "2023_01"
edition = "2023_10"

# See more keys and their definitions at https://docs.swmansion.com/scarb/docs/reference/manifest.html

Expand Down
2 changes: 1 addition & 1 deletion scarb/src/ops/new.rs
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ fn mk(

// Create the `Scarb.toml` file.
let manifest_path = canonical_path.join(MANIFEST_FILE_NAME);
let edition = edition_variant(Edition::default());
let edition = edition_variant(Edition::V2023_10);
fsx::write(
&manifest_path,
formatdoc! {r#"
Expand Down
1 change: 1 addition & 0 deletions website/docs/guides/creating-a-new-package.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ Let's take a closer look at `Scarb.toml`:
[package]
name = "hello_world"
version = "0.1.0"
edition = "2023_10"

[dependencies]
```
Expand Down
2 changes: 1 addition & 1 deletion website/docs/reference/manifest.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ Setting the edition key in `[package]` will affect all targets in the package, i
edition = '2023_01'
```

Most manifests have the edition field filled in automatically by `scarb new` with the default edition.
Most manifests have the edition field filled in automatically by `scarb new` with the latest available edition.
If the edition field is not present in Scarb.toml, then the default edition is assumed.

### `cairo-version`
Expand Down

0 comments on commit 70bad9a

Please sign in to comment.