1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-28 11:37:44 +00:00

Merge pull request #5129 from nouritsu/main

docs(bin,has): add docstrings for macros bin and has
This commit is contained in:
Daniel Hofstetter 2023-08-03 11:43:49 +02:00 committed by GitHub
commit 9be4a89260
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 0 deletions

View file

@ -31,6 +31,9 @@ use std::path::{Component, Path, PathBuf, MAIN_SEPARATOR};
#[cfg(target_os = "windows")] #[cfg(target_os = "windows")]
use winapi_util::AsHandleRef; use winapi_util::AsHandleRef;
/// Used to check if the `mode` has its `perm` bit set.
///
/// This macro expands to `mode & perm != 0`.
#[cfg(unix)] #[cfg(unix)]
#[macro_export] #[macro_export]
macro_rules! has { macro_rules! has {

View file

@ -86,6 +86,10 @@ use std::sync::atomic::Ordering;
use once_cell::sync::Lazy; use once_cell::sync::Lazy;
/// Execute utility code for `util`.
///
/// This macro expands to a main function that invokes the `uumain` function in `util`
/// Exits with code returned by `uumain`.
#[macro_export] #[macro_export]
macro_rules! bin { macro_rules! bin {
($util:ident) => { ($util:ident) => {