mirror of
https://github.com/elicpeter/nyx.git
synced 2026-06-24 20:28:06 +02:00
refactor(dynamic): enhance Rust receiver construction with recursive dependency resolution, add Liquibase changelog context detection, and expand test coverage
This commit is contained in:
parent
acec041676
commit
8786d1b71e
6 changed files with 546 additions and 25 deletions
|
|
@ -0,0 +1,23 @@
|
|||
// Benign control for recursive Rust class-method receiver construction.
|
||||
|
||||
pub struct CommandRunner;
|
||||
|
||||
impl CommandRunner {
|
||||
pub fn run(&self, input: &str) -> String {
|
||||
let out = std::process::Command::new("true")
|
||||
.arg(input)
|
||||
.output()
|
||||
.expect("exec");
|
||||
String::from_utf8_lossy(&out.stdout).into_owned()
|
||||
}
|
||||
}
|
||||
|
||||
pub struct UserService {
|
||||
pub runner: CommandRunner,
|
||||
}
|
||||
|
||||
impl UserService {
|
||||
pub fn run(&self, input: &str) -> String {
|
||||
self.runner.run(input)
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
// Rust class-method fixture whose receiver has same-file dependencies
|
||||
// but no Default or new() constructor.
|
||||
|
||||
pub struct CommandRunner;
|
||||
|
||||
impl CommandRunner {
|
||||
pub fn run(&self, input: &str) -> String {
|
||||
let cmd = format!("true {}", input);
|
||||
let out = std::process::Command::new("sh")
|
||||
.arg("-c")
|
||||
.arg(&cmd)
|
||||
.output()
|
||||
.expect("exec");
|
||||
String::from_utf8_lossy(&out.stdout).into_owned()
|
||||
}
|
||||
}
|
||||
|
||||
pub struct UserService {
|
||||
pub runner: CommandRunner,
|
||||
}
|
||||
|
||||
impl UserService {
|
||||
pub fn run(&self, input: &str) -> String {
|
||||
self.runner.run(input)
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue