huskies: merge 927

This commit is contained in:
dave
2026-05-12 17:49:44 +00:00
parent b8945654bf
commit 03a99b3cf1
33 changed files with 119 additions and 25 deletions
+1
View File
@@ -7,6 +7,7 @@
///
/// Returns `(staged, unstaged, untracked)` where each entry is the file path
/// string from the porcelain line.
#[allow(clippy::string_slice)] // line[3..]: git porcelain format has 2 ASCII status chars + ASCII space
pub fn parse_git_status_porcelain(stdout: &str) -> (Vec<String>, Vec<String>, Vec<String>) {
let mut staged: Vec<String> = Vec::new();
let mut unstaged: Vec<String> = Vec::new();
+5 -4
View File
@@ -109,10 +109,11 @@ pub(super) fn save_credentials(
// Build the pool key: prefer email, fall back to token prefix.
let key = if email.is_empty() {
format!(
"account-{}",
&token.access_token[..token.access_token.len().min(16)]
)
let prefix = token
.access_token
.get(..token.access_token.len().min(16))
.unwrap_or(&token.access_token);
format!("account-{prefix}")
} else {
email.to_string()
};
+1
View File
@@ -88,6 +88,7 @@ pub fn parse_test_counts(output: &str) -> (u64, u64) {
///
/// For example, `extract_count("5 passed; 0 failed", "passed")` returns
/// `Some(5)`. Returns `None` if no digit sequence precedes `label`.
#[allow(clippy::string_slice)] // pos from line.find(label) → always a char boundary
pub fn extract_count(line: &str, label: &str) -> Option<u64> {
let pos = line.find(label)?;
let before = line[..pos].trim_end();