Bump dependencies
This commit is contained in:
parent
6a18c5d9cc
commit
650835b9eb
754
Cargo.lock
generated
754
Cargo.lock
generated
File diff suppressed because it is too large
Load Diff
22
Cargo.toml
22
Cargo.toml
@ -6,20 +6,20 @@ edition = "2021"
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[dependencies]
|
||||
crossterm = { version = "0.26.1", optional = true}
|
||||
openssh = { version = "0.9.9", features = ["native-mux"], default-features = false, optional = true}
|
||||
ratatui = { version = "0.20.1", optional = true}
|
||||
serde = { version = "1.0.159", features = ["derive"], optional = true }
|
||||
serde_json = { version = "1.0.95", optional = true}
|
||||
crossterm = { version = "0.27.0", optional = true}
|
||||
openssh = { version = "0.10.3", features = ["native-mux"], default-features = false, optional = true}
|
||||
ratatui = { version = "0.26.0", optional = true}
|
||||
serde = { version = "1.0.196", features = ["derive"], optional = true }
|
||||
serde_json = { version = "1.0.113", optional = true}
|
||||
structopt = { version = "0.3.26", optional = true}
|
||||
tokio = { version = "1.27.0", features = ["rt"], optional = true}
|
||||
url = { version = "2.3.1" }
|
||||
uuid = { version = "1.3.0" }
|
||||
tokio = { version = "1.36.0", features = ["rt"], optional = true}
|
||||
url = { version = "2.5.0" }
|
||||
uuid = { version = "1.7.0" }
|
||||
|
||||
[dev-dependencies]
|
||||
mockall = "0.11.4"
|
||||
once_cell = "1.17.1"
|
||||
tempfile = "3.5.0"
|
||||
mockall = "0.12.1"
|
||||
once_cell = "1.19.0"
|
||||
tempfile = "3.10.0"
|
||||
|
||||
[features]
|
||||
default = ["database-json", "library-beets"]
|
||||
|
@ -151,9 +151,9 @@ mod tests {
|
||||
|
||||
#[test]
|
||||
fn save_errors() {
|
||||
// serde_json will raise an error as it requires keys to be strings.
|
||||
let mut object = HashMap::<Option<String>, String>::new();
|
||||
object.insert(Some(String::from("artist")), String::from("string"));
|
||||
// serde_json will raise an error as it has certain requirements on keys.
|
||||
let mut object = HashMap::<Result<(), ()>, String>::new();
|
||||
object.insert(Ok(()), String::from("string"));
|
||||
let serde_err = serde_json::to_string(&object);
|
||||
assert!(serde_err.is_err());
|
||||
|
||||
|
@ -7,7 +7,6 @@ use musichoard::collection::{
|
||||
Collection,
|
||||
};
|
||||
use ratatui::{
|
||||
backend::Backend,
|
||||
layout::{Alignment, Rect},
|
||||
style::{Color, Style},
|
||||
widgets::{Block, BorderType, Borders, Clear, List, ListItem, ListState, Paragraph, Wrap},
|
||||
@ -20,7 +19,7 @@ use crate::tui::app::{
|
||||
};
|
||||
|
||||
pub trait IUi {
|
||||
fn render<APP: IAppAccess, B: Backend>(app: &mut APP, frame: &mut Frame<'_, B>);
|
||||
fn render<APP: IAppAccess>(app: &mut APP, frame: &mut Frame);
|
||||
}
|
||||
|
||||
struct ArtistArea {
|
||||
@ -445,13 +444,13 @@ impl Ui {
|
||||
.title(format!(" {title} "))
|
||||
}
|
||||
|
||||
fn render_list_widget<B: Backend>(
|
||||
fn render_list_widget(
|
||||
title: &str,
|
||||
list: List,
|
||||
state: &mut WidgetState,
|
||||
active: bool,
|
||||
area: Rect,
|
||||
frame: &mut Frame<'_, B>,
|
||||
frame: &mut Frame,
|
||||
) {
|
||||
frame.render_stateful_widget(
|
||||
list.highlight_style(Self::highlight_style(active))
|
||||
@ -464,12 +463,12 @@ impl Ui {
|
||||
state.height = area.height.saturating_sub(2) as usize;
|
||||
}
|
||||
|
||||
fn render_info_widget<B: Backend>(
|
||||
fn render_info_widget(
|
||||
title: &str,
|
||||
paragraph: Paragraph,
|
||||
active: bool,
|
||||
area: Rect,
|
||||
frame: &mut Frame<'_, B>,
|
||||
frame: &mut Frame,
|
||||
) {
|
||||
frame.render_widget(
|
||||
paragraph
|
||||
@ -479,12 +478,12 @@ impl Ui {
|
||||
);
|
||||
}
|
||||
|
||||
fn render_overlay_widget<B: Backend>(
|
||||
fn render_overlay_widget(
|
||||
title: &str,
|
||||
paragraph: Paragraph,
|
||||
area: Rect,
|
||||
error: bool,
|
||||
frame: &mut Frame<'_, B>,
|
||||
frame: &mut Frame,
|
||||
) {
|
||||
frame.render_widget(Clear, area);
|
||||
frame.render_widget(
|
||||
@ -525,12 +524,12 @@ impl Ui {
|
||||
blocks
|
||||
}
|
||||
|
||||
fn render_columns<B: Backend>(
|
||||
fn render_columns(
|
||||
paragraphs: Vec<Paragraph>,
|
||||
min: u16,
|
||||
active: bool,
|
||||
area: Rect,
|
||||
frame: &mut Frame<'_, B>,
|
||||
frame: &mut Frame,
|
||||
) {
|
||||
for column in Self::columns(paragraphs, min, area).into_iter() {
|
||||
frame.render_widget(
|
||||
@ -543,21 +542,21 @@ impl Ui {
|
||||
}
|
||||
}
|
||||
|
||||
fn render_artist_column<B: Backend>(st: ArtistState, ar: ArtistArea, fr: &mut Frame<'_, B>) {
|
||||
fn render_artist_column(st: ArtistState, ar: ArtistArea, fr: &mut Frame) {
|
||||
Self::render_list_widget("Artists", st.list, st.state, st.active, ar.list, fr);
|
||||
}
|
||||
|
||||
fn render_album_column<B: Backend>(st: AlbumState, ar: AlbumArea, fr: &mut Frame<'_, B>) {
|
||||
fn render_album_column(st: AlbumState, ar: AlbumArea, fr: &mut Frame) {
|
||||
Self::render_list_widget("Albums", st.list, st.state, st.active, ar.list, fr);
|
||||
Self::render_info_widget("Album info", st.info, st.active, ar.info, fr);
|
||||
}
|
||||
|
||||
fn render_track_column<B: Backend>(st: TrackState, ar: TrackArea, fr: &mut Frame<'_, B>) {
|
||||
fn render_track_column(st: TrackState, ar: TrackArea, fr: &mut Frame) {
|
||||
Self::render_list_widget("Tracks", st.list, st.state, st.active, ar.list, fr);
|
||||
Self::render_info_widget("Track info", st.info, st.active, ar.info, fr);
|
||||
}
|
||||
|
||||
fn render_minibuffer<B: Backend>(state: &AppPublicState, ar: Rect, fr: &mut Frame<'_, B>) {
|
||||
fn render_minibuffer(state: &AppPublicState, ar: Rect, fr: &mut Frame) {
|
||||
let mut mb = Minibuffer::paragraphs(state);
|
||||
mb.paragraphs = mb
|
||||
.paragraphs
|
||||
@ -576,11 +575,11 @@ impl Ui {
|
||||
Self::render_columns(mb.paragraphs, mb.columns, false, area, fr);
|
||||
}
|
||||
|
||||
fn render_main_frame<B: Backend>(
|
||||
fn render_main_frame(
|
||||
artists: &Collection,
|
||||
selection: &mut Selection,
|
||||
state: &AppPublicState,
|
||||
frame: &mut Frame<'_, B>,
|
||||
frame: &mut Frame,
|
||||
) {
|
||||
let active = selection.active;
|
||||
let areas = FrameArea::new(frame.size());
|
||||
@ -629,11 +628,7 @@ impl Ui {
|
||||
Self::render_minibuffer(state, areas.minibuffer, frame);
|
||||
}
|
||||
|
||||
fn render_info_overlay<B: Backend>(
|
||||
artists: &Collection,
|
||||
selection: &mut Selection,
|
||||
frame: &mut Frame<'_, B>,
|
||||
) {
|
||||
fn render_info_overlay(artists: &Collection, selection: &mut Selection, frame: &mut Frame) {
|
||||
let area = OverlayBuilder::default().build(frame.size());
|
||||
|
||||
let artist_selection = &mut selection.artist;
|
||||
@ -642,7 +637,7 @@ impl Ui {
|
||||
Self::render_overlay_widget("Artist", artist_overlay.properties, area, false, frame);
|
||||
}
|
||||
|
||||
fn render_reload_overlay<B: Backend>(frame: &mut Frame<'_, B>) {
|
||||
fn render_reload_overlay(frame: &mut Frame) {
|
||||
let area = OverlayBuilder::default()
|
||||
.with_width(OverlaySize::Value(39))
|
||||
.with_height(OverlaySize::Value(4))
|
||||
@ -653,7 +648,7 @@ impl Ui {
|
||||
Self::render_overlay_widget("Reload", reload_text, area, false, frame);
|
||||
}
|
||||
|
||||
fn render_error_overlay<S: AsRef<str>, B: Backend>(title: S, msg: S, frame: &mut Frame<'_, B>) {
|
||||
fn render_error_overlay<S: AsRef<str>>(title: S, msg: S, frame: &mut Frame) {
|
||||
let area = OverlayBuilder::default()
|
||||
.with_height(OverlaySize::Value(4))
|
||||
.build(frame.size());
|
||||
@ -667,7 +662,7 @@ impl Ui {
|
||||
}
|
||||
|
||||
impl IUi for Ui {
|
||||
fn render<APP: IAppAccess, B: Backend>(app: &mut APP, frame: &mut Frame<'_, B>) {
|
||||
fn render<APP: IAppAccess>(app: &mut APP, frame: &mut Frame) {
|
||||
let app = app.get();
|
||||
|
||||
let collection = app.collection;
|
||||
|
Loading…
Reference in New Issue
Block a user