From 8605170628dbc180cd469d33cb24240c273cf130 Mon Sep 17 00:00:00 2001 From: n4n5 Date: Sun, 30 Jun 2024 22:51:19 +0200 Subject: [PATCH] document uucore::Args #5068 --- src/uucore/src/lib/lib.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/uucore/src/lib/lib.rs b/src/uucore/src/lib/lib.rs index 366c420d9..f3bc211ec 100644 --- a/src/uucore/src/lib/lib.rs +++ b/src/uucore/src/lib/lib.rs @@ -181,6 +181,10 @@ pub fn execution_phrase() -> &'static str { &EXECUTION_PHRASE } +/// Args contains arguments passed to the utility. +/// It is a trait that extends `Iterator`. +/// It provides utility functions to collect the arguments into a `Vec`. +/// The collected `Vec` can be lossy or ignore invalid encoding. pub trait Args: Iterator + Sized { /// Collects the iterator into a `Vec`, lossily converting the `OsString`s to `Strings`. fn collect_lossy(self) -> Vec {