Skip to content

Commit

Permalink
chore: 修复单侧问题
Browse files Browse the repository at this point in the history
  • Loading branch information
Cnotech committed Jul 29, 2024
1 parent 60c9b82 commit a48842a
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 7 deletions.
1 change: 1 addition & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"cSpell.words": [
"aarch",
"ABORTIFHUNG",
"appdata",
"appname",
Expand Down
6 changes: 3 additions & 3 deletions src/types/mirror.rs
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ impl MirrorPkgSoftware {
.unwrap()
.as_micros() as u64,
url_template:
"http:/localhost:3000/api/redirect?path=/nep/{scope}/{software}/{fileName}"
"http:/localhost:3000/api/redirect?path=/nep/{scope}/{software}/{file_name}"
.to_string(),
tree,
}
Expand Down Expand Up @@ -225,7 +225,7 @@ pub struct SearchResult {

#[test]
fn test_mirror_pkg_software() {
assert!(MirrorPkgSoftware::_demo()
MirrorPkgSoftware::_demo()
.verify_self(&"".to_string())
.is_ok())
.unwrap()
}
2 changes: 1 addition & 1 deletion src/types/steps/delete.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ fn delete(target: &String, force: bool) -> Result<()> {
Err(anyhow!("Error(Delete):Failed to delete '{target}' : '{e}', enable field 'force' to try shredding"))
}
} else {
log!("Log(Delete):Deleted '{target}' by moving to recycle bin");
log!("Debug(Delete):Deleted '{target}' by moving to recycle bin");
Ok(())
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/types/steps/wait.rs
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ fn test_wait() {
.unwrap();

let elapsed = now.elapsed();
assert!(Duration::from_millis(500) <= elapsed && elapsed <= Duration::from_millis(550));
assert!(Duration::from_millis(500) <= elapsed && elapsed <= Duration::from_millis(600));

// 测试过短条件等待
let d = Duration::from_millis(200);
Expand Down
4 changes: 2 additions & 2 deletions src/utils/arch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ fn test_parse_arch() {
assert_eq!(parse_arch(&"x64".to_string()).unwrap(), SysArch::X64);
assert_eq!(parse_arch(&"X86".to_string()).unwrap(), SysArch::X86);
assert_eq!(parse_arch(&"x86".to_string()).unwrap(), SysArch::X86);
assert_eq!(parse_arch(&"AMD64".to_string()).unwrap(), SysArch::ARM64);
assert_eq!(parse_arch(&"amd64".to_string()).unwrap(), SysArch::ARM64);
assert_eq!(parse_arch(&"ARM64".to_string()).unwrap(), SysArch::ARM64);
assert_eq!(parse_arch(&"aRm64".to_string()).unwrap(), SysArch::ARM64);
assert!(parse_arch(&"RISC".to_string()).is_err());
}

Expand Down

0 comments on commit a48842a

Please sign in to comment.