Skip to content

Commit

Permalink
fix: build issue after rebase master(tui -> 0.10.0)
Browse files Browse the repository at this point in the history
  • Loading branch information
7sDream committed Jul 26, 2020
1 parent 9e07f94 commit b2d966b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 12 deletions.
9 changes: 0 additions & 9 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/font/matcher/ct/font_info.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ pub struct FontInfo<'fs> {
impl<'fs> FontInfo<'fs> {
// TODO: Figure out how to get font face index in file from FontDescriptor
#[allow(clippy::unused_self)]
fn font_face_index(&self) -> Option<usize> {
const fn font_face_index(&self) -> Option<usize> {
Some(0)
}
}
Expand Down
6 changes: 4 additions & 2 deletions src/preview/terminal/ui/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,9 @@ pub struct UI<'matcher, 'render, Library: CharRendererLoader<'render>> {
state: State<'matcher, 'render, Library>,
}

impl<'matcher, 'render, Library: CharRendererLoader<'render>> UI<'matcher, 'render, Library> {
impl<'matcher, 'render, Library: CharRendererLoader<'render> + 'render>
UI<'matcher, 'render, Library>
{
pub fn new(
c: char, families: SortedFamilies<'matcher>, ft: &'render mut Library,
) -> Option<Self> {
Expand All @@ -77,7 +79,7 @@ impl<'matcher, 'render, Library: CharRendererLoader<'render>> UI<'matcher, 'rend
let index = self.state.index();
let title = format!("Fonts {}/{}", index + 1, families.len());

let list = List::new(families.iter().copied().map(ListItem::new).collect::<Vec<_>>())
let list = List::new(families.map(ListItem::new).collect::<Vec<_>>())
.block(Block::default().title(Span::raw(title)).borders(Borders::ALL))
.highlight_style(Style::default().fg(Color::LightBlue).add_modifier(Modifier::BOLD));

Expand Down

0 comments on commit b2d966b

Please sign in to comment.