Skip to content

Commit 82dad3a

Browse files
committed
rust: remove rand dependency
1 parent 8cb22a8 commit 82dad3a

File tree

3 files changed

+3
-9
lines changed

3 files changed

+3
-9
lines changed

rust/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ serde_yml = "0.0"
1515
clap = { version = "4.5", default-features = false, features = ["std", "cargo", "help", "usage", "suggestions"] }
1616
log = { version = "0.4", default-features = false, features = ["std"] }
1717
env_logger = { version = "0.11", default-features = false, features = ["humantime"]}
18-
rand = { version = "0.9", default-features = false, features = ["std", "thread_rng"] }
1918
directories = "6.0"
2019
shell-words = "1.1"
2120
tempfile = "3.13"

rust/bear/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ directories.workspace = true
3434
log.workspace = true
3535
env_logger.workspace = true
3636
shell-words.workspace = true
37-
rand.workspace = true
3837
tempfile.workspace = true
3938
signal-hook.workspace = true
4039

rust/bear/src/intercept/tcp.rs

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ mod tests {
236236
std::sync::LazyLock::new(|| {
237237
vec![
238238
Event {
239-
pid: pid(),
239+
pid: ProcessId(3425),
240240
execution: Execution {
241241
executable: PathBuf::from("/usr/bin/ls"),
242242
arguments: vec_of_strings!["ls", "-l"],
@@ -245,7 +245,7 @@ mod tests {
245245
},
246246
},
247247
Event {
248-
pid: pid(),
248+
pid: ProcessId(3492),
249249
execution: Execution {
250250
executable: PathBuf::from("/usr/bin/cc"),
251251
arguments: vec_of_strings![
@@ -263,7 +263,7 @@ mod tests {
263263
},
264264
},
265265
Event {
266-
pid: pid(),
266+
pid: ProcessId(3522),
267267
execution: Execution {
268268
executable: PathBuf::from("/usr/bin/ld"),
269269
arguments: vec_of_strings!["ld", "-o", "./file_a", "./file_a.o"],
@@ -276,9 +276,5 @@ mod tests {
276276
},
277277
]
278278
});
279-
280-
fn pid() -> ProcessId {
281-
ProcessId(rand::random::<u32>())
282-
}
283279
}
284280
}

0 commit comments

Comments
 (0)