Skip to content

Commit

Permalink
simply Choices trait
Browse files Browse the repository at this point in the history
  • Loading branch information
ssanj committed Aug 18, 2024
1 parent 5eb27ac commit 918108f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
5 changes: 2 additions & 3 deletions src/choice/choice_style.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ use std::fmt::Display;

use crate::error::ZatResult;

pub trait ChoiceStyle<T> {
fn get_choice<'a>(prompt: &str, items: &'a [&'a T]) -> ZatResult<&'a T> where
T: Display;
pub trait ChoiceStyle<T: Display> {
fn get_choice<'a>(prompt: &str, items: &'a [&'a T]) -> ZatResult<&'a T>;
}
1 change: 0 additions & 1 deletion src/choice/numbered_choice_style.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
use std::fmt::Display;
use std::io::{stdin, Read};
use std::{println as p, format as s};
use crate::templates::Choice;
use crate::error::{ZatResult, ZatError};
use ansi_term::Color::{Red, Yellow};
use ansi_term::Style;
Expand Down

0 comments on commit 918108f

Please sign in to comment.