/// Display a task to the user.
Display a task to the user.
Display a task to the user .
fn display_task_inline(config: &Config, uid: UID, task: &Task, opts: &DisplayOptions) {
  let task_name = task.name();
  let status = task.status();
  print!(
    " {uid:<uid_width$} {age:<age_width$}",
    uid = uid,
    uid_width = opts.task_uid_width,
    age = friendly_task_age(task),
    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 = friendly_spent_time(task.spent_time(), status),
      spent_width = opts.spent_width,
    );
  }
  if display_empty_cols || opts.has_priorities {
    if let Some(prio) = task.priority() {
      print!(
        " {priority:<prio_width$}",
        priority = friendly_priority(prio, config),
        prio_width = config.prio_col_name().width(),
      );
    } else {
      print!(
        " {prio:<prio_width$}",
        prio = "",
        prio_width = config.prio_col_name().width(),
      );
    }
  }
  if display_empty_cols || opts.has_projects {
    print!(
      " {project:<project_width$}",
      project = friendly_project(task.project().unwrap_or("")),
      project_width = opts.project_width,
    );
  }
  print!(
    " {status:<status_width$}",
    status = highlight_status(config, status),
    status_width = opts.status_width,
  );
  display_description(config, opts, status, task_name);
}
fn display_task_inline ( config : & Config , uid : UID , task : & Task , opts : & DisplayOptions ) { let task_name = task . name ( ) ; let status = task . status ( ) ; print ! ( " " uid uid uid_width opts task_uid_width age friendly_task_age ( task ) age_width opts age_width ) ; let display_empty_cols = config . display_empty_cols ( ) ; if display_empty_cols || opts . has_spent_time { print ! ( " " spent friendly_spent_time ( task spent_time ( ) status ) spent_width opts spent_width ) ; } if display_empty_cols || opts . has_priorities { if let Some ( prio ) = task . priority ( ) { print ! ( " " priority friendly_priority ( prio config ) prio_width config prio_col_name ( ) width ( ) ) ; } else { print ! ( " " prio " " prio_width config prio_col_name ( ) width ( ) ) ; } } if display_empty_cols || opts . has_projects { print ! ( " " project friendly_project ( task project ( ) unwrap_or ( " " ) ) project_width opts project_width ) ; } print ! ( " " status highlight_status ( config status ) status_width opts status_width ) ; display_description ( config , opts , status , task_name ) ; }
Display a task to the user.
Display a task to the user .
config
&Config
uid
UID
task
&Task
opts
&DisplayOptions