wrap into workspace
This commit is contained in:
@@ -1,8 +1,5 @@
|
|||||||
[package]
|
[workspace]
|
||||||
edition = "2024"
|
resolver = "3"
|
||||||
name = "smart-house"
|
members = [
|
||||||
version = "0.0.0"
|
"house"
|
||||||
|
]
|
||||||
[dependencies]
|
|
||||||
tokio = { version = "1.49.0", features = ["rt", "net", "io-util", "time"] }
|
|
||||||
rand = { version = "0.10.0", features = ["std"] }
|
|
||||||
|
|||||||
8
smart-house/house/Cargo.toml
Normal file
8
smart-house/house/Cargo.toml
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
[package]
|
||||||
|
edition = "2024"
|
||||||
|
name = "smart-house"
|
||||||
|
version = "0.0.0"
|
||||||
|
|
||||||
|
[dependencies]
|
||||||
|
tokio = { version = "1.49.0", features = ["rt", "net", "io-util", "time"] }
|
||||||
|
rand = { version = "0.10.0", features = ["std"] }
|
||||||
@@ -42,8 +42,8 @@ impl House {
|
|||||||
impl PrintStatus for House {
|
impl PrintStatus for House {
|
||||||
fn print_status_into(&self, out: &mut dyn Write) -> Result<(), std::io::Error> {
|
fn print_status_into(&self, out: &mut dyn Write) -> Result<(), std::io::Error> {
|
||||||
for (room_name, room) in self.rooms.iter() {
|
for (room_name, room) in self.rooms.iter() {
|
||||||
out.write_fmt(format_args!("{}:", room_name))?;
|
out.write_fmt(format_args!("{}:\n", room_name))?;
|
||||||
out.write_fmt(format_args!("{}", "-".repeat(32)))?;
|
out.write_fmt(format_args!("{}\n", "-".repeat(32)))?;
|
||||||
room.print_status_into(out)?;
|
room.print_status_into(out)?;
|
||||||
out.write_fmt(format_args!("\n"))?;
|
out.write_fmt(format_args!("\n"))?;
|
||||||
println!();
|
println!();
|
||||||
Reference in New Issue
Block a user