docs(embedded): Cross-link impls

This commit is contained in:
Ed Page 2023-06-19 16:57:36 -05:00
parent 98ed8abe6d
commit 2cd89e3c25
2 changed files with 2 additions and 0 deletions

View file

@ -85,6 +85,7 @@ pub fn exec(config: &mut Config, args: &ArgMatches) -> CliResult {
ops::run(&ws, &compile_opts, &values_os(args, "args")).map_err(|err| to_run_error(config, err))
}
/// See also `util/toml/mod.rs`s `is_embedded`
pub fn is_manifest_command(arg: &str) -> bool {
let path = Path::new(arg);
1 < path.components().count() || path.extension() == Some(OsStr::new("rs"))

View file

@ -74,6 +74,7 @@ pub fn read_manifest(
.map_err(|err| ManifestError::new(err, path.into()))
}
/// See also `bin/cargo/commands/run.rs`s `is_manifest_command`
fn is_embedded(path: &Path) -> bool {
let ext = path.extension();
ext.is_none() || ext == Some(OsStr::new("rs"))