Skip to content

Commit 2fba152

Browse files
committed
ci: add audit workflow
Also fixed reported issues from cargo deny check.
1 parent 3f4bb8f commit 2fba152

File tree

8 files changed

+96
-90
lines changed

8 files changed

+96
-90
lines changed

.github/workflows/audit.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
name: Audit
2+
3+
on:
4+
push:
5+
6+
jobs:
7+
audit:
8+
uses: pimalaya/nix/.github/workflows/audit.yml@master
9+
secrets: inherit

Cargo.lock

Lines changed: 70 additions & 70 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ tokio = ["dep:tokio"]
2222

2323
[dev-dependencies]
2424
env_logger = "0.11"
25-
tempdir = "0.3"
25+
tempfile = "3.20"
2626
tokio = { version = "1", features = ["full"] }
2727

2828
[dependencies]

SECURITY.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Security Policy
2+
3+
## Reporting a Vulnerability
4+
5+
Feel free to open a public issue here if you found a security vulnerability.
6+
7+
If, for whatever reason, you prefer to not make it public, please write an email to <clement.douin@posteo.net>.

examples/tokio-create-many-files.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@ use std::{
77
};
88

99
use io_fs::{coroutines::create_files::CreateFiles, error::FsResult, runtimes::tokio::handle};
10-
use tempdir::TempDir;
10+
use tempfile::tempdir;
1111

1212
#[tokio::main]
1313
async fn main() {
1414
let _ = env_logger::try_init();
1515

16-
let tmp = TempDir::new("tokio-create-many-files").unwrap();
16+
let tmp = tempdir().unwrap();
1717

1818
let n: usize = match env::var("N") {
1919
Ok(n) => n.parse().unwrap(),
@@ -37,8 +37,6 @@ async fn main() {
3737
let duration = start.elapsed();
3838

3939
println!("Created {n} temp files in {duration:?}!");
40-
41-
tmp.close().unwrap();
4240
}
4341

4442
fn read_line(prompt: &str) -> String {

flake.lock

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/std.rs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@ use io_fs::{
1212
error::FsResult,
1313
runtimes::std::handle,
1414
};
15-
use tempdir::TempDir;
15+
use tempfile::tempdir;
1616

1717
#[test]
1818
fn std() {
1919
let _ = env_logger::try_init();
2020

21-
let workdir = TempDir::new("test-fs-std").unwrap();
21+
let workdir = tempdir().unwrap();
2222

2323
// create single directory
2424

@@ -254,8 +254,4 @@ fn std() {
254254

255255
assert_eq!(false, workdir.path().join("dir1").is_dir());
256256
assert_eq!(false, workdir.path().join("dir2").is_dir());
257-
258-
// end
259-
260-
workdir.close().unwrap()
261257
}

tests/tokio.rs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@ use io_fs::{
1212
error::FsResult,
1313
runtimes::tokio::handle,
1414
};
15-
use tempdir::TempDir;
15+
use tempfile::tempdir;
1616

1717
#[tokio::test]
1818
async fn tokio() {
1919
let _ = env_logger::try_init();
2020

21-
let workdir = TempDir::new("test-fs-std").unwrap();
21+
let workdir = tempdir().unwrap();
2222

2323
// create single directory
2424

@@ -254,8 +254,4 @@ async fn tokio() {
254254

255255
assert_eq!(false, workdir.path().join("dir1").is_dir());
256256
assert_eq!(false, workdir.path().join("dir2").is_dir());
257-
258-
// end
259-
260-
workdir.close().unwrap()
261257
}

0 commit comments

Comments
 (0)