Skip to content

Commit

Permalink
fix: compiler warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
aidanaden committed Jun 27, 2024
1 parent f35de96 commit 37947c3
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 13 deletions.
2 changes: 1 addition & 1 deletion rm-main/src/ui/tabs/torrents/task_manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ impl TaskManager {
}
}

pub enum CurrentTask {
enum CurrentTask {
AddMagnetBar(AddMagnetBar),
DeleteBar(DeleteBar),
FilterBar(FilterBar),
Expand Down
12 changes: 0 additions & 12 deletions rm-main/src/ui/tabs/torrents/tasks/status.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ impl StatusBar {
impl Component for StatusBar {
fn render(&mut self, f: &mut Frame, rect: Rect) {
match &self.task_status {
CurrentTaskState::Nothing => return,
CurrentTaskState::Loading(state) => {
let title = match self.task {
StatusTask::Add => "Adding torrent...",
Expand Down Expand Up @@ -92,21 +91,12 @@ pub enum StatusTask {

#[derive(Clone)]
pub enum CurrentTaskState {
Nothing,
Loading(Arc<Mutex<ThrobberState>>),
Success(),
Failure(),
}

impl CurrentTaskState {
fn new() -> Self {
Self::Nothing
}

fn loading(&mut self, state: Arc<Mutex<ThrobberState>>) {
*self = Self::Loading(state);
}

fn failure(&mut self) {
*self = Self::Failure();
}
Expand All @@ -115,5 +105,3 @@ impl CurrentTaskState {
*self = Self::Success();
}
}

impl Component for CurrentTaskState {}

0 comments on commit 37947c3

Please sign in to comment.