Merge pull request #1763 from rhysd/fix-doc-warning

cli: fix warnings from `cargo doc`
This commit is contained in:
Max Brunsfeld 2022-05-31 14:44:29 -07:00 committed by GitHub
commit 1c9d2c5bb0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -8,12 +8,12 @@ use std::{env, fs};
/// Holds the contents of tree-sitter's configuration file.
///
/// The file typically lives at `~/.config/tree-sitter/config.json`, but see the [`load`][] method
/// for the full details on where it might be located.
/// The file typically lives at `~/.config/tree-sitter/config.json`, but see the [`Config::load`][]
/// method for the full details on where it might be located.
///
/// This type holds the generic JSON content of the configuration file. Individual tree-sitter
/// components will use the [`get`][] method to parse that JSON to extract configuration fields
/// that are specific to that component.
/// components will use the [`Config::get`][] method to parse that JSON to extract configuration
/// fields that are specific to that component.
#[derive(Debug)]
pub struct Config {
pub location: PathBuf,
@ -72,9 +72,10 @@ impl Config {
Ok(Config { location, config })
}
/// Creates an empty initial configuration file. You can then use the [`add`][] method to add
/// the component-specific configuration types for any components that want to add content to
/// the default file, and then use [`save`][] to write the configuration to disk.
/// Creates an empty initial configuration file. You can then use the [`Config::add`][] method
/// to add the component-specific configuration types for any components that want to add
/// content to the default file, and then use [`Config::save`][] to write the configuration to
/// disk.
///
/// (Note that this is typically only done by the `tree-sitter init-config` command.)
pub fn initial() -> Result<Config> {