fn format_arguments(&self, is_required: bool) -> String {
        let filtered_arguments = self
            .arguments
            .args
            .values()
            .filter(|arg| is_required == arg.required)
            .collect::<Vec<_>>();

        let max_arg_width = filtered_arguments
            .iter()
            .map(|arg| arg.format_name().len())
            .max()
            .unwrap_or(0);

        filtered_arguments
            .into_iter()
            .map(|arg| arg.format_help(max_arg_width))
            .collect::<Vec<_>>()
            .join("\n")
    }
// Filter arguments by whether or not it is required.
// Align arguments by setting width to length of the longest argument.
Filter arguments by whether or not it is required.
Align arguments by setting width to length of the longest argument.
Filter arguments by whether or not it is required . Align arguments by setting width to length of the longest argument .
fn format_arguments(&self, is_required: bool) -> String {
        let filtered_arguments = self
            .arguments
            .args
            .values()
            .filter(|arg| is_required == arg.required)
            .collect::<Vec<_>>();
        let max_arg_width = filtered_arguments
            .iter()
            .map(|arg| arg.format_name().len())
            .max()
            .unwrap_or(0);
        filtered_arguments
            .into_iter()
            .map(|arg| arg.format_help(max_arg_width))
            .collect::<Vec<_>>()
            .join("\n")
    }
fn format_arguments ( & self , is_required : bool ) -> String { let filtered_arguments = self . arguments . args . values ( ) . filter ( | arg | is_required == arg . required ) . collect :: < Vec < _ > > ( ) ; let max_arg_width = filtered_arguments . iter ( ) . map ( | arg | arg . format_name ( ) . len ( ) ) . max ( ) . unwrap_or ( 0 ) ; filtered_arguments . into_iter ( ) . map ( | arg | arg . format_help ( max_arg_width ) ) . collect :: < Vec < _ > > ( ) . join ( " \n " ) }
Filter arguments by whether or not it is required.
Filter arguments by whether or not it is required .
&self
is_required
bool
&self
is_required
bool