Skip to content

Commit 058389f

Browse files
committed
fix: resolve all clippy -D warnings failures
- core/utils.rs: remove unreachable thread::sleep + attempt increment after a match where every arm diverges (return/continue/exit) - commands/base.rs: annotate run_callback with #[allow(clippy::too_many_arguments)] (pre-existing 10-param signature; refactor is out of scope here) - core/templating.rs: introduce SqlQueriesResult type alias to satisfy clippy::type_complexity on load_sql_queries return type https://claude.ai/code/session_01HcAKNRjjQRn7TywY28zv1Y
1 parent 46a1958 commit 058389f

3 files changed

Lines changed: 8 additions & 9 deletions

File tree

src/commands/base.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -506,6 +506,7 @@ impl CommandRunner {
506506
/// 3. On exhaustion, call `catch_error_and_exit`.
507507
///
508508
/// `operation` is used only for log messages (e.g. `"create"`).
509+
#[allow(clippy::too_many_arguments)]
509510
pub fn run_callback(
510511
&mut self,
511512
resource: &Resource,

src/core/templating.rs

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -73,15 +73,16 @@ fn parse_anchor(anchor: &str) -> (String, HashMap<String, u32>, HashMap<String,
7373
(key, uint_options, str_options)
7474
}
7575

76-
/// Load SQL queries from a .iql file, split by anchors.
77-
/// Matches Python's `load_sql_queries`.
78-
fn load_sql_queries(
79-
file_path: &Path,
80-
) -> (
76+
/// Return type of `load_sql_queries`: (templates, uint_options, str_options).
77+
type SqlQueriesResult = (
8178
HashMap<String, String>,
8279
HashMap<String, HashMap<String, u32>>,
8380
HashMap<String, HashMap<String, String>>,
84-
) {
81+
);
82+
83+
/// Load SQL queries from a .iql file, split by anchors.
84+
/// Matches Python's `load_sql_queries`.
85+
fn load_sql_queries(file_path: &Path) -> SqlQueriesResult {
8586
let content = match fs::read_to_string(file_path) {
8687
Ok(c) => c,
8788
Err(e) => {

src/core/utils.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -719,9 +719,6 @@ pub fn run_stackql_dml_returning(
719719
}
720720
}
721721
}
722-
723-
thread::sleep(Duration::from_secs(retry_delay as u64));
724-
attempt += 1;
725722
}
726723

727724
(String::new(), None)

0 commit comments

Comments
 (0)