Skip to content

Commit

Permalink
add: enables same machine client test
Browse files Browse the repository at this point in the history
  • Loading branch information
luftaquila committed May 2, 2024
1 parent 84b01ad commit 969b20c
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,20 @@ impl Client {

let cid = load_or_generate_cid()?;

let mut displays: Vec<Display> = DisplayInfo::all()
.expect("[ERR] failed to get system displays")
.into_iter()
.map(|x| Display::from(x, cid))
.collect();

for disp in displays.iter_mut() {
disp.id += 1;
}

Ok(Client {
tcp: TcpStream::connect(server)?,
cid,
displays: DisplayInfo::all()
.expect("[ERR] failed to get system displays")
.into_iter()
.map(|x| Display::from(x, cid))
.collect(),
displays,
})
}

Expand Down

0 comments on commit 969b20c

Please sign in to comment.