File tree Expand file tree Collapse file tree 4 files changed +11
-8
lines changed Expand file tree Collapse file tree 4 files changed +11
-8
lines changed Original file line number Diff line number Diff line change 1818 - uses : actions/checkout@v3
1919 - name : Install mdbook
2020 run : curl -sSL https://github.com/rust-lang/mdBook/releases/download/v0.4.35/mdbook-v0.4.35-x86_64-unknown-linux-gnu.tar.gz | tar -xz
21+ - name : Check blacksmith format
22+ run : cargo fmt --check --manifest-path=blacksmith/Cargo.toml
2123 - name : Build book
2224 run : ./mdbook build
2325 - name : Deploy book
Original file line number Diff line number Diff line change 1- use std:: collections:: BTreeMap ;
21use serde:: Deserialize ;
2+ use std:: collections:: BTreeMap ;
33
44#[ derive( Deserialize ) ]
55pub struct Target {
@@ -21,4 +21,3 @@ pub struct Packages {
2121pub struct Channel {
2222 pub pkg : Packages ,
2323}
24-
Original file line number Diff line number Diff line change @@ -130,8 +130,10 @@ impl Blacksmith {
130130
131131 // Go over stable versions in https://static.rust-lang.org/manifests.txt in reverse order.
132132 let manifests_content = reqwest:: blocking:: get ( MANIFESTS_URL ) ?. text ( ) ?;
133- let stable_manifest_url_regex =
134- regex:: Regex :: new ( r"^static\.rust-lang\.org/dist/\d{4}-\d{2}-\d{2}/channel-rust-1\.(\d+)\.(\d+)\.toml$" ) . unwrap ( ) ;
133+ let stable_manifest_url_regex = regex:: Regex :: new (
134+ r"^static\.rust-lang\.org/dist/\d{4}-\d{2}-\d{2}/channel-rust-1\.(\d+)\.(\d+)\.toml$" ,
135+ )
136+ . unwrap ( ) ;
135137 for manifest_url in manifests_content. lines ( ) . rev ( ) {
136138 let minor;
137139 let patch;
@@ -141,14 +143,14 @@ impl Blacksmith {
141143 minor = captures. get ( 1 ) . unwrap ( ) . as_str ( ) ;
142144 patch = captures. get ( 2 ) . unwrap ( ) . as_str ( ) ;
143145 } else {
144- continue
146+ continue ;
145147 }
146148
147149 let full_version = format ! ( "1.{}.{}" , minor, patch) ;
148150
149151 // Skip latest stable version.
150152 if & full_version == latest_stable_version {
151- continue
153+ continue ;
152154 }
153155
154156 // Download https://static.rust-lang.org/dist/channel-rust-{major.minor.patch}.toml and process it.
Original file line number Diff line number Diff line change @@ -11,8 +11,8 @@ command = "./build.bash"
1111
1212[output .html ]
1313additional-js = [" js/moment.min.js" , " js/index.js" ]
14- no-section-label = true
15- git-repository-url = " https://github.com/rust-lang/rust-forge"
14+ no-section-label = true
15+ git-repository-url = " https://github.com/rust-lang/rust-forge"
1616edit-url-template = " https://github.com/rust-lang/rust-forge/edit/master/{path}"
1717curly-quotes = true
1818
You can’t perform that action at this time.
0 commit comments