Simplify test code a bit, use Request::new() to simplfy constructing requests
This commit is contained in:
+6
-6
@@ -9,12 +9,12 @@ fn main() -> std::io::Result<()> {
|
||||
let mut stream = UnixStream::connect(&OPTIONS.socket_name)?;
|
||||
println!("Connected to server");
|
||||
|
||||
let request = Request {
|
||||
userid: OPTIONS.username.clone(),
|
||||
password: OPTIONS.password.clone(),
|
||||
service: "ignore-this".to_string(),
|
||||
realm: "also-ignore-this".to_string(),
|
||||
};
|
||||
let request = Request::new(
|
||||
&OPTIONS.username,
|
||||
&OPTIONS.password,
|
||||
"ignore-this",
|
||||
"also-ignore-this",
|
||||
);
|
||||
|
||||
request.write_to_stream(&mut stream)?;
|
||||
let response = read_string(&mut stream)?;
|
||||
|
||||
Reference in New Issue
Block a user