Clean up warnings

This commit is contained in:
Emi Simpson 2022-01-08 09:14:11 -05:00
parent c39b545029
commit 34f548748a
Signed by: Emi
GPG Key ID: A12F2C2FFDC3D847
5 changed files with 5 additions and 13 deletions

View File

@ -41,5 +41,5 @@ version = "0.3.0"
[dependencies.rodio]
# Playing audio
default-features = false
features = ["symphonia"]
features = ["symphonia-all"]
path = "./rodio/"

View File

@ -67,12 +67,6 @@ impl Editor {
pub fn handle_lyric_event(&mut self, line_no: usize, kind: LyricEvent) {
self.lyrics.handle_event(line_no, kind)
}
pub fn update_line(&mut self, new_content: String, line_no: usize) {
self.lyrics.update_line(new_content, line_no);
}
pub fn advance_line(&mut self, current_line: usize) {
self.lyrics.advance_line(current_line);
}
pub fn current_line_mut(&mut self) -> (usize, &mut Lyric) {
self.lyrics.current_line_mut()
}

View File

@ -87,7 +87,6 @@ impl Program<Message> for FileSelector {
x: bounds.x + bounds.width,
y: bounds.y + bounds.height,
};
let screen_top_left = Point { x: bounds.x, y: bounds.y };
let mut frame = Frame::new(bounds.size());
@ -104,13 +103,13 @@ impl Program<Message> for FileSelector {
((self.tick + offset_per_index * index) % MAX_TICKS) as f32 /
MAX_TICKS as f32;
let top_left = interpolate(text_rect.0, screen_top_left, size);
let top_left = interpolate(text_rect.0, Point::ORIGIN, size);
let far_corner = interpolate(text_rect_far_point, bound_far_point, size);
let rect_size = Size::new(far_corner.x - top_left.x, far_corner.y - top_left.y);
(Path::rectangle(top_left, rect_size), color, size)
(Path::rectangle(top_left, rect_size), color)
})
.for_each(|(rect, color, size)|
.for_each(|(rect, color)|
frame.stroke(
&rect,
Stroke::default()

View File

@ -155,6 +155,7 @@ impl Player {
/// Return the duration of this track
///
/// This is cheap and exact. All processing is done before hand.
#[allow(dead_code)]
pub fn get_duration(&self) -> Duration {
self.duration
}

View File

@ -5,8 +5,6 @@ use iced::Color;
use iced::widget::container;
use iced::widget::text_input;
const TRANSPARENT: Color = Color { r: 0., g: 0., b: 0., a: 0. };
#[derive(Copy, Clone, Debug)]
pub struct Theme {
pub base_color: Color,