Skip to content

Commit 6bcbc42

Browse files
committed
Update mdbook.
1 parent 6654c58 commit 6bcbc42

File tree

4 files changed

+20
-111
lines changed

4 files changed

+20
-111
lines changed

Cargo.lock

+10-104
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,9 @@ dependencies = [
6565

6666
[[package]]
6767
name = "anyhow"
68-
version = "1.0.26"
68+
version = "1.0.31"
6969
source = "registry+https://github.com/rust-lang/crates.io-index"
70-
checksum = "7825f6833612eb2414095684fcf6c635becf3ce97fe48cf6421321e93bfbd53c"
70+
checksum = "85bb70cc08ec97ca5450e6eba421deeea5f172c0fc61f78b5357b2a8e8be195f"
7171

7272
[[package]]
7373
name = "arc-swap"
@@ -529,7 +529,7 @@ dependencies = [
529529
"if_chain",
530530
"itertools 0.9.0",
531531
"lazy_static",
532-
"pulldown-cmark 0.7.1",
532+
"pulldown-cmark",
533533
"quine-mc_cluskey",
534534
"quote 1.0.2",
535535
"regex-syntax",
@@ -807,40 +807,6 @@ dependencies = [
807807
"winapi 0.3.8",
808808
]
809809

810-
[[package]]
811-
name = "darling"
812-
version = "0.8.6"
813-
source = "registry+https://github.com/rust-lang/crates.io-index"
814-
checksum = "9158d690bc62a3a57c3e45b85e4d50de2008b39345592c64efd79345c7e24be0"
815-
dependencies = [
816-
"darling_core",
817-
"darling_macro",
818-
]
819-
820-
[[package]]
821-
name = "darling_core"
822-
version = "0.8.6"
823-
source = "registry+https://github.com/rust-lang/crates.io-index"
824-
checksum = "d2a368589465391e127e10c9e3a08efc8df66fd49b87dc8524c764bbe7f2ef82"
825-
dependencies = [
826-
"fnv",
827-
"ident_case",
828-
"proc-macro2 0.4.30",
829-
"quote 0.6.12",
830-
"syn 0.15.35",
831-
]
832-
833-
[[package]]
834-
name = "darling_macro"
835-
version = "0.8.6"
836-
source = "registry+https://github.com/rust-lang/crates.io-index"
837-
checksum = "244e8987bd4e174385240cde20a3657f607fb0797563c28255c353b5819a07b1"
838-
dependencies = [
839-
"darling_core",
840-
"quote 0.6.12",
841-
"syn 0.15.35",
842-
]
843-
844810
[[package]]
845811
name = "datafrog"
846812
version = "2.0.1"
@@ -989,15 +955,6 @@ dependencies = [
989955
"termcolor",
990956
]
991957

992-
[[package]]
993-
name = "error-chain"
994-
version = "0.12.0"
995-
source = "registry+https://github.com/rust-lang/crates.io-index"
996-
checksum = "07e791d3be96241c77c43846b665ef1384606da2cd2a48730abe606a12906e02"
997-
dependencies = [
998-
"backtrace",
999-
]
1000-
1001958
[[package]]
1002959
name = "error_index_generator"
1003960
version = "0.0.0"
@@ -1341,12 +1298,6 @@ version = "2.0.0"
13411298
source = "registry+https://github.com/rust-lang/crates.io-index"
13421299
checksum = "b9b6c53306532d3c8e8087b44e6580e10db51a023cf9b433cea2ac38066b92da"
13431300

1344-
[[package]]
1345-
name = "ident_case"
1346-
version = "1.0.1"
1347-
source = "registry+https://github.com/rust-lang/crates.io-index"
1348-
checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39"
1349-
13501301
[[package]]
13511302
name = "idna"
13521303
version = "0.1.5"
@@ -1439,12 +1390,6 @@ dependencies = [
14391390
"libc",
14401391
]
14411392

1442-
[[package]]
1443-
name = "is-match"
1444-
version = "0.1.0"
1445-
source = "registry+https://github.com/rust-lang/crates.io-index"
1446-
checksum = "7e5b386aef33a1c677be65237cb9d32c3f3ef56bd035949710c4bb13083eb053"
1447-
14481393
[[package]]
14491394
name = "itertools"
14501395
version = "0.8.0"
@@ -1797,31 +1742,29 @@ dependencies = [
17971742

17981743
[[package]]
17991744
name = "mdbook"
1800-
version = "0.3.7"
1745+
version = "0.4.0"
18011746
source = "registry+https://github.com/rust-lang/crates.io-index"
1802-
checksum = "e7ec525f7ebccc2dd935c263717250cd37f9a4b264a77c5dbc950ea2734d8159"
1747+
checksum = "2567ffadc0fd26fe15d6f6e0a80639f19f6a50082fdb460d0ae5d1f7298181be"
18031748
dependencies = [
18041749
"ammonia",
1750+
"anyhow",
18051751
"chrono",
18061752
"clap",
18071753
"elasticlunr-rs",
1808-
"env_logger 0.6.2",
1809-
"error-chain",
1754+
"env_logger 0.7.1",
18101755
"handlebars",
1811-
"itertools 0.8.0",
18121756
"lazy_static",
18131757
"log",
18141758
"memchr",
18151759
"open",
1816-
"pulldown-cmark 0.6.1",
1760+
"pulldown-cmark",
18171761
"regex",
18181762
"serde",
18191763
"serde_derive",
18201764
"serde_json",
18211765
"shlex",
18221766
"tempfile",
18231767
"toml",
1824-
"toml-query",
18251768
]
18261769

18271770
[[package]]
@@ -2411,25 +2354,14 @@ dependencies = [
24112354
"cc",
24122355
]
24132356

2414-
[[package]]
2415-
name = "pulldown-cmark"
2416-
version = "0.6.1"
2417-
source = "registry+https://github.com/rust-lang/crates.io-index"
2418-
checksum = "1c205cc82214f3594e2d50686730314f817c67ffa80fe800cf0db78c3c2b9d9e"
2419-
dependencies = [
2420-
"bitflags",
2421-
"getopts",
2422-
"memchr",
2423-
"unicase",
2424-
]
2425-
24262357
[[package]]
24272358
name = "pulldown-cmark"
24282359
version = "0.7.1"
24292360
source = "registry+https://github.com/rust-lang/crates.io-index"
24302361
checksum = "3e142c3b8f49d2200605ee6ba0b1d757310e9e7a72afe78c36ee2ef67300ee00"
24312362
dependencies = [
24322363
"bitflags",
2364+
"getopts",
24332365
"memchr",
24342366
"unicase",
24352367
]
@@ -4091,7 +4023,7 @@ version = "0.0.0"
40914023
dependencies = [
40924024
"itertools 0.8.0",
40934025
"minifier",
4094-
"pulldown-cmark 0.7.1",
4026+
"pulldown-cmark",
40954027
"rustc-rayon",
40964028
"serde",
40974029
"serde_json",
@@ -4944,32 +4876,6 @@ dependencies = [
49444876
"serde",
49454877
]
49464878

4947-
[[package]]
4948-
name = "toml-query"
4949-
version = "0.9.0"
4950-
source = "registry+https://github.com/rust-lang/crates.io-index"
4951-
checksum = "a24369a1894ac8224efcfd567c3d141aea360292f49888e7ec7dcc316527aebb"
4952-
dependencies = [
4953-
"failure",
4954-
"failure_derive",
4955-
"is-match",
4956-
"lazy_static",
4957-
"regex",
4958-
"toml",
4959-
"toml-query_derive",
4960-
]
4961-
4962-
[[package]]
4963-
name = "toml-query_derive"
4964-
version = "0.9.0"
4965-
source = "registry+https://github.com/rust-lang/crates.io-index"
4966-
checksum = "3c99ca245ec273c7e75c8ee58f47b882d0146f3c2c8495158082c6671e8b5335"
4967-
dependencies = [
4968-
"darling",
4969-
"quote 0.6.12",
4970-
"syn 0.15.35",
4971-
]
4972-
49734879
[[package]]
49744880
name = "tracing"
49754881
version = "0.1.15"

src/tools/rustbook/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@ edition = "2018"
99
clap = "2.25.0"
1010

1111
[dependencies.mdbook]
12-
version = "0.3.7"
12+
version = "0.4.0"
1313
default-features = false
1414
features = ["search"]

src/tools/rustbook/src/main.rs

+9-3
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ fn main() {
5151
// Build command implementation
5252
pub fn build(args: &ArgMatches<'_>) -> Result3<()> {
5353
let book_dir = get_book_dir(args);
54-
let mut book = MDBook::load(&book_dir)?;
54+
let mut book = load_book(&book_dir)?;
5555

5656
// Set this to allow us to catch bugs in advance.
5757
book.config.build.create_missing = false;
@@ -67,7 +67,7 @@ pub fn build(args: &ArgMatches<'_>) -> Result3<()> {
6767

6868
fn test(args: &ArgMatches<'_>) -> Result3<()> {
6969
let book_dir = get_book_dir(args);
70-
let mut book = MDBook::load(&book_dir)?;
70+
let mut book = load_book(&book_dir)?;
7171
book.test(vec![])
7272
}
7373

@@ -81,10 +81,16 @@ fn get_book_dir(args: &ArgMatches<'_>) -> PathBuf {
8181
}
8282
}
8383

84+
fn load_book(book_dir: &Path) -> Result3<MDBook> {
85+
let mut book = MDBook::load(book_dir)?;
86+
book.config.set("output.html.input-404", "").unwrap();
87+
Ok(book)
88+
}
89+
8490
fn handle_error(error: mdbook::errors::Error) -> ! {
8591
eprintln!("Error: {}", error);
8692

87-
for cause in error.iter().skip(1) {
93+
for cause in error.chain().skip(1) {
8894
eprintln!("\tCaused By: {}", cause);
8995
}
9096

src/tools/tidy/src/deps.rs

-3
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,6 @@ const LICENSES: &[&str] = &[
2626
const EXCEPTIONS: &[(&str, &str)] = &[
2727
("mdbook", "MPL-2.0"), // mdbook
2828
("openssl", "Apache-2.0"), // cargo, mdbook
29-
("toml-query", "MPL-2.0"), // mdbook
30-
("toml-query_derive", "MPL-2.0"), // mdbook
31-
("is-match", "MPL-2.0"), // mdbook
3229
("rdrand", "ISC"), // mdbook, rustfmt
3330
("fuchsia-cprng", "BSD-3-Clause"), // mdbook, rustfmt
3431
("fuchsia-zircon-sys", "BSD-3-Clause"), // rustdoc, rustc, cargo

0 commit comments

Comments
 (0)