fn display_task_header(config: &Config, opts: &DisplayOptions) {
  print!(
    " {uid:<uid_width$} {age:<age_width$}",
    uid = config.uid_col_name().underline(),
    uid_width = opts.task_uid_width,
    age = config.age_col_name().underline(),
    age_width = opts.age_width,
  );

  let display_empty_cols = config.display_empty_cols();

  if display_empty_cols || opts.has_spent_time {
    print!(
      " {spent:<spent_width$}",
      spent = config.spent_col_name().underline(),
      spent_width = opts.spent_width,
    );
  }

  if display_empty_cols || opts.has_priorities {
    print!(
      " {priority:<prio_width$}",
      priority = config.prio_col_name().underline(),
      prio_width = config.prio_col_name().width(),
    );
  }

  if display_empty_cols || opts.has_projects {
    print!(
      " {project:<project_width$}",
      project = config.project_col_name().underline(),
      project_width = opts.project_width,
    );
  }

  if let Some(max_description_cols) = opts.max_description_cols {
    println!(
      " {status:<status_width$} {description:<description_width$}",
      status = config.status_col_name().underline(),
      status_width = opts.status_width,
      description = config.description_col_name().underline(),
      description_width = opts.description_width.min(max_description_cols),
    );
  }
}
/// Display the header of tasks.
Display the header of tasks.
Display the header of tasks .
fn display_task_header(config: &Config, opts: &DisplayOptions) {
  print!(
    " {uid:<uid_width$} {age:<age_width$}",
    uid = config.uid_col_name().underline(),
    uid_width = opts.task_uid_width,
    age = config.age_col_name().underline(),
    age_width = opts.age_width,
  );
  let display_empty_cols = config.display_empty_cols();
  if display_empty_cols || opts.has_spent_time {
    print!(
      " {spent:<spent_width$}",
      spent = config.spent_col_name().underline(),
      spent_width = opts.spent_width,
    );
  }
  if display_empty_cols || opts.has_priorities {
    print!(
      " {priority:<prio_width$}",
      priority = config.prio_col_name().underline(),
      prio_width = config.prio_col_name().width(),
    );
  }
  if display_empty_cols || opts.has_projects {
    print!(
      " {project:<project_width$}",
      project = config.project_col_name().underline(),
      project_width = opts.project_width,
    );
  }
  if let Some(max_description_cols) = opts.max_description_cols {
    println!(
      " {status:<status_width$} {description:<description_width$}",
      status = config.status_col_name().underline(),
      status_width = opts.status_width,
      description = config.description_col_name().underline(),
      description_width = opts.description_width.min(max_description_cols),
    );
  }
}
fn display_task_header ( config : & Config , opts : & DisplayOptions ) { print ! ( " " uid config uid_col_name ( ) underline ( ) uid_width opts task_uid_width age config age_col_name ( ) underline ( ) age_width opts age_width ) ; let display_empty_cols = config . display_empty_cols ( ) ; if display_empty_cols || opts . has_spent_time { print ! ( " " spent config spent_col_name ( ) underline ( ) spent_width opts spent_width ) ; } if display_empty_cols || opts . has_priorities { print ! ( " " priority config prio_col_name ( ) underline ( ) prio_width config prio_col_name ( ) width ( ) ) ; } if display_empty_cols || opts . has_projects { print ! ( " " project config project_col_name ( ) underline ( ) project_width opts project_width ) ; } if let Some ( max_description_cols ) = opts . max_description_cols { println ! ( " " status config status_col_name ( ) underline ( ) status_width opts status_width description config description_col_name ( ) underline ( ) description_width opts description_width min ( max_description_cols ) ) ; } }
Display the header of tasks.
Display the header of tasks .
config
&Config
opts
&DisplayOptions
config
&Config
opts
&DisplayOptions