Skip to content

Commit 7de1613

Browse files
chore: update rust edition and clippy/fmt
1 parent 7bfbe72 commit 7de1613

File tree

24 files changed

+130
-118
lines changed

24 files changed

+130
-118
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ members = ["crates/*"]
44

55
[workspace.package]
66
version = "0.1.0-alpha.1"
7-
edition = "2021"
7+
edition = "2024"
88
rust-version = "1.85"
99
license = "MIT"
1010
authors = ["Jay Hesselberth"]

crates/charmer-core/src/lib.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
pub mod main_log;
77
pub mod metadata;
88

9-
pub use main_log::{find_latest_log, parse_log_file, parse_main_log, SnakemakeLogInfo};
9+
pub use main_log::{SnakemakeLogInfo, find_latest_log, parse_log_file, parse_main_log};
1010
pub use metadata::{
11-
decode_metadata_filename, parse_metadata_file, scan_metadata_dir, MetadataError, SnakemakeJob,
12-
SnakemakeMetadata,
11+
MetadataError, SnakemakeJob, SnakemakeMetadata, decode_metadata_filename, parse_metadata_file,
12+
scan_metadata_dir,
1313
};

crates/charmer-lsf/src/bhist.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
//! Query LSF job history via bhist.
22
33
use crate::types::{LsfJob, LsfJobState};
4-
use charmer_parsers::{parse_memory_mb, run_command_allow_failure, MemoryFormat};
4+
use charmer_parsers::{MemoryFormat, parse_memory_mb, run_command_allow_failure};
55
use chrono::{DateTime, Utc};
66
use std::time::Duration;
77
use thiserror::Error;

crates/charmer-lsf/src/bjobs.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
33
use crate::types::{LsfJob, LsfJobState};
44
use charmer_parsers::{
5-
non_empty_string, parse_lsf_timestamp, parse_memory_mb, run_command_allow_failure,
6-
split_delimited, MemoryFormat,
5+
MemoryFormat, non_empty_string, parse_lsf_timestamp, parse_memory_mb,
6+
run_command_allow_failure, split_delimited,
77
};
88
use std::time::Duration;
99
use thiserror::Error;

crates/charmer-lsf/src/failure.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
//! Query detailed failure information and provide actionable suggestions.
44
55
use charmer_parsers::{
6-
format_duration, format_duration_lsf, parse_duration_secs, parse_memory_mb,
7-
run_command_allow_failure, MemoryFormat,
6+
MemoryFormat, format_duration, format_duration_lsf, parse_duration_secs, parse_memory_mb,
7+
run_command_allow_failure,
88
};
99
use thiserror::Error;
1010
use tokio::process::Command;

crates/charmer-lsf/src/lib.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ pub mod bjobs;
77
pub mod failure;
88
pub mod types;
99

10-
pub use bhist::{query_bhist, BhistError};
11-
pub use bjobs::{query_bjobs, BjobsError};
12-
pub use failure::{analyze_failure, FailureAnalysis, FailureError, FailureMode};
10+
pub use bhist::{BhistError, query_bhist};
11+
pub use bjobs::{BjobsError, query_bjobs};
12+
pub use failure::{FailureAnalysis, FailureError, FailureMode, analyze_failure};
1313
pub use types::{LsfJob, LsfJobState};

crates/charmer-monitor/src/app.rs

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@ use crate::components::{
55
};
66
use crate::ui::Theme;
77
use charmer_runs::RunInfo;
8-
use charmer_state::{JobStatus, PipelineState, MAIN_PIPELINE_JOB_ID};
8+
use charmer_state::{JobStatus, MAIN_PIPELINE_JOB_ID, PipelineState};
99
use crossterm::event::{self, Event, KeyCode, KeyEvent, KeyModifiers};
1010
use ratatui::{
11+
Frame,
1112
layout::{Constraint, Direction, Layout, Rect},
1213
widgets::Clear,
13-
Frame,
1414
};
1515
use std::time::{Duration, Instant};
1616

@@ -113,11 +113,11 @@ pub struct App {
113113
command_expanded: bool, // Whether command section is expanded in details
114114

115115
// Run management
116-
pub runs: Vec<RunInfo>, // Available runs
117-
pub selected_run: Option<String>, // Currently selected run UUID
118-
pub show_run_picker: bool, // Whether run picker modal is open
119-
pub run_picker_index: usize, // Selected index in run picker
120-
pub show_all_jobs: bool, // Whether to show all jobs or just snakemake jobs
116+
pub runs: Vec<RunInfo>, // Available runs
117+
pub selected_run: Option<String>, // Currently selected run UUID
118+
pub show_run_picker: bool, // Whether run picker modal is open
119+
pub run_picker_index: usize, // Selected index in run picker
120+
pub show_all_jobs: bool, // Whether to show all jobs or just snakemake jobs
121121
}
122122

123123
impl App {
@@ -627,7 +627,10 @@ impl App {
627627
if let Some(run) = self.runs.get(self.run_picker_index) {
628628
self.selected_run = Some(run.run_uuid.clone());
629629
self.status_message = Some((
630-
format!("Selected run: {}", &run.run_uuid[..8.min(run.run_uuid.len())]),
630+
format!(
631+
"Selected run: {}",
632+
&run.run_uuid[..8.min(run.run_uuid.len())]
633+
),
631634
Instant::now(),
632635
));
633636
}
@@ -836,11 +839,7 @@ impl App {
836839
&run.run_uuid
837840
};
838841

839-
let jobs_str = format!(
840-
"{}/{}",
841-
run.completed_jobs,
842-
run.total_jobs.unwrap_or(0)
843-
);
842+
let jobs_str = format!("{}/{}", run.completed_jobs, run.total_jobs.unwrap_or(0));
844843

845844
let time_ago = format_time_ago(run.last_updated);
846845

crates/charmer-monitor/src/components/footer.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
//! Footer component with keyboard shortcuts and status messages.
22
33
use ratatui::{
4+
Frame,
45
layout::{Constraint, Direction, Layout, Rect},
56
style::{Color, Modifier, Style},
67
text::{Line, Span},
78
widgets::Paragraph,
8-
Frame,
99
};
1010

1111
/// Version from Cargo.toml

crates/charmer-monitor/src/components/header.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
use charmer_state::PipelineState;
44
use chrono::Local;
55
use ratatui::{
6+
Frame,
67
layout::Rect,
78
style::{Color, Modifier, Style},
89
text::{Line, Span},
910
widgets::{Block, Borders, Paragraph},
10-
Frame,
1111
};
1212

1313
pub struct Header;

crates/charmer-monitor/src/components/job_detail.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
use charmer_state::{EnvType, ExecutionEnvironment, FailureMode, Job, JobStatus, PipelineState};
44
use chrono::Utc;
55
use ratatui::{
6+
Frame,
67
layout::Rect,
78
style::{Color, Modifier, Style},
89
text::{Line, Span},
910
widgets::{Block, Borders, Paragraph},
10-
Frame,
1111
};
1212

1313
/// Color palette for wildcard values (matches job_list.rs).

0 commit comments

Comments
 (0)