Skip to content

Commit 15bb6a8

Browse files
committed
fix: Update for new syntax
1 parent f9cb938 commit 15bb6a8

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

text/3502-cargo-script.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@ deferred out.
2222
Example:
2323
````rust
2424
#!/usr/bin/env cargo
25-
```cargo
25+
---
2626
[dependencies]
2727
clap = { version = "4.2", features = ["derive"] }
28-
```
28+
---
2929

3030
use clap::Parser;
3131

@@ -147,10 +147,10 @@ requested packages.
147147
To depend on a library hosted on [crates.io], you modify `hello_world.rs`:
148148
````rust
149149
#!/usr/bin/env cargo
150-
```cargo
150+
---
151151
[dependencies]
152152
time = "0.1.12"
153-
```
153+
---
154154

155155
fn main() {
156156
println!("Hello, world!");
@@ -174,11 +174,11 @@ crates:
174174

175175
````rust
176176
#!/usr/bin/env cargo
177-
```cargo
177+
---
178178
[dependencies]
179179
time = "0.1.12"
180180
regex = "0.1.41"
181-
```
181+
---
182182

183183
fn main() {
184184
let re = Regex::new(r"^\d{4}-\d{2}-\d{2}$").unwrap();
@@ -697,10 +697,10 @@ It is invalid for an embedded manifest to be missing `edition`, erroring when it
697697
The minimal single-package file would end up being:
698698
````rust
699699
#!/usr/bin/env cargo
700-
```cargo
700+
---
701701
[package]
702702
edition = "2018"
703-
```
703+
---
704704

705705
fn main() {
706706
}
@@ -763,10 +763,10 @@ We could set it the edition the feature is stablized in (2021?) but that is just
763763
People are likely to get this by running `cargo new` and could easily forget it
764764
otherwise.
765765
````rust
766-
```cargo
766+
---
767767
[package]
768768
edition = "2018"
769-
```
769+
---
770770

771771
fn main() {
772772
}
@@ -790,10 +790,10 @@ fn main() {
790790
is automatically converted to
791791
````rust
792792
#!/usr/bin/env cargo
793-
```cargo
793+
---
794794
[package]
795795
edition = "2018"
796-
```
796+
---
797797

798798
fn main() {
799799
}

0 commit comments

Comments
 (0)