always render issue UUIDs as 128 bit hex numbers #6

Merged
sigil-03 merged 1 commit from fix-issue-uuids into main 2025-07-07 13:53:32 -06:00
2 changed files with 3 additions and 3 deletions

View file

@ -213,7 +213,7 @@ mod tests {
fn test_create_orphan_branch() {
let rnd: u128 = rand::random();
let mut branch = std::string::String::from("entomologist-test-branch-");
branch.push_str(&format!("{:0x}", rnd));
branch.push_str(&format!("{:032x}", rnd));
create_orphan_branch(&branch).unwrap();
git_remove_branch(&branch).unwrap();
}
@ -228,7 +228,7 @@ mod tests {
fn test_branch_exists_1() {
let rnd: u128 = rand::random();
let mut branch = std::string::String::from("entomologist-missing-branch-");
branch.push_str(&format!("{:0x}", rnd));
branch.push_str(&format!("{:032x}", rnd));
let r = git_branch_exists(&branch).unwrap();
assert_eq!(r, false);
}

View file

@ -107,7 +107,7 @@ impl Issue {
pub fn new(dir: &std::path::Path) -> Result<Self, IssueError> {
let mut issue_dir = std::path::PathBuf::from(dir);
let rnd: u128 = rand::random();
issue_dir.push(&format!("{:0x}", rnd));
issue_dir.push(&format!("{:032x}", rnd));
std::fs::create_dir(&issue_dir)?;
Ok(Self {
description: String::from(""), // FIXME: kind of bogus to use the empty string as None