Skip to content
This repository has been archived by the owner on Dec 29, 2022. It is now read-only.

Commit

Permalink
Properly infer full_docs
Browse files Browse the repository at this point in the history
3efe567 ("Enhanced hover tooltips") added the `full_docs`
configuration option as an `Inferrable`. However, it failed to actually
merge the option during a config update, causing a panic if the client
specified `full_docs` to be `null`. Example panic:

    thread '<unnamed>' panicked at 'internal error: entered unreachable code', src/config.rs:111:33

Fix this to prevent the crash.
  • Loading branch information
tchebb committed Dec 17, 2018
1 parent 67bce0b commit 77c32e9
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,7 @@ impl Config {
new.target_dir = self.target_dir.combine_with_default(&new.target_dir, None);
new.build_lib = self.build_lib.combine_with_default(&new.build_lib, false);
new.build_bin = self.build_bin.combine_with_default(&new.build_bin, None);
new.full_docs = self.full_docs.combine_with_default(&new.full_docs, false);

*self = new;
}
Expand Down

0 comments on commit 77c32e9

Please sign in to comment.