Skip to content

Commit

Permalink
Merge pull request #896 from winpax/remove-async-vt3
Browse files Browse the repository at this point in the history
Remove async vt3
  • Loading branch information
jewlexx authored Nov 12, 2024
2 parents 040fa7f + 802b1aa commit ce4132b
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 42 deletions.
53 changes: 14 additions & 39 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ sfsu-macros = { version = "0.1.0", path = "./macros" }
shadow-rs = "0.35"
sprinkles-rs.workspace = true
tokio = { version = "1.37", features = ["full"] }
vt3 = { git = "https://github.com/winpax/vt3.git", version = "0.8", package = "async_vt3" }
vt3 = "0.7.3"
which = "7.0"
windows = { version = "0.58", features = ["Win32_Storage_FileSystem"] }
windows-version = "0.1"
Expand Down
10 changes: 8 additions & 2 deletions src/commands/virustotal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,11 @@ impl super::Command for Args {

let result = match search_type {
SearchType::FileHash(hash) => {
let result = client.file_info(&hash.to_string()).await.recoverable();
let result = tokio::task::spawn_blocking(move || {
client.file_info(&hash.to_string())
})
.await?
.recoverable();

if let Some(result) = result {
serde_json::to_value(result?)?
Expand All @@ -206,7 +210,9 @@ impl super::Command for Args {
}
}
SearchType::Url(url) => {
let result = client.url_info(&url).await.recoverable();
let result = tokio::task::spawn_blocking(move || client.url_info(&url))
.await?
.recoverable();

if let Some(result) = result {
serde_json::to_value(result?)?
Expand Down

0 comments on commit ce4132b

Please sign in to comment.