mirror of
https://github.com/dexoron/dcr.git
synced 2026-10-22 05:29:36 +00:00
docs: add and clean up AI-generated rustdoc comments (grok-4.5)
This commit is contained in:
@@ -17,6 +17,7 @@
|
||||
|
||||
use super::path_util::{default_bin_rel, default_lib_rel, join_dir, with_exe_suffix};
|
||||
|
||||
/// Returns the path to the binary executable for the given profile, name, and optional target directory.
|
||||
pub fn bin_path(profile: &str, name: &str, target_dir: Option<&str>) -> String {
|
||||
let file = with_exe_suffix(name);
|
||||
match target_dir {
|
||||
@@ -25,7 +26,10 @@ pub fn bin_path(profile: &str, name: &str, target_dir: Option<&str>) -> String {
|
||||
}
|
||||
}
|
||||
|
||||
/// Returns the path to the library file for the given profile, name, and optional target directory.
|
||||
/// The library name is forced to end with ".lib".
|
||||
pub fn lib_path(profile: &str, name: &str, target_dir: Option<&str>) -> String {
|
||||
// Ensure the library file name ends with ".lib"
|
||||
let file = if name.to_ascii_lowercase().ends_with(".lib") {
|
||||
name.to_string()
|
||||
} else {
|
||||
@@ -37,11 +41,15 @@ pub fn lib_path(profile: &str, name: &str, target_dir: Option<&str>) -> String {
|
||||
}
|
||||
}
|
||||
|
||||
/// Returns the path to the ELF binary for the given profile, name, and optional target directory.
|
||||
pub fn elf_path(profile: &str, name: &str, target_dir: Option<&str>) -> String {
|
||||
bin_path(profile, name, target_dir)
|
||||
}
|
||||
|
||||
/// Returns the path to the EFI binary for the given profile, name, and optional target directory.
|
||||
/// The binary name is forced to end with ".efi".
|
||||
pub fn efi_path(profile: &str, name: &str, target_dir: Option<&str>) -> String {
|
||||
// Ensure the EFI file name ends with ".efi"
|
||||
let file = if name.to_ascii_lowercase().ends_with(".efi") {
|
||||
name.to_string()
|
||||
} else {
|
||||
@@ -53,7 +61,10 @@ pub fn efi_path(profile: &str, name: &str, target_dir: Option<&str>) -> String {
|
||||
}
|
||||
}
|
||||
|
||||
/// Returns the path to the shared library (DLL) for the given profile, name, and optional target directory.
|
||||
/// The library name is forced to end with ".dll".
|
||||
pub fn shared_lib_path(profile: &str, name: &str, target_dir: Option<&str>) -> String {
|
||||
// Ensure the shared library file name ends with ".dll"
|
||||
let file = if name.to_ascii_lowercase().ends_with(".dll") {
|
||||
name.to_string()
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user