wrap into workspace
This commit is contained in:
@@ -1,8 +1,5 @@
|
||||
[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"] }
|
||||
[workspace]
|
||||
resolver = "3"
|
||||
members = [
|
||||
"house"
|
||||
]
|
||||
|
||||
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 {
|
||||
fn print_status_into(&self, out: &mut dyn Write) -> Result<(), std::io::Error> {
|
||||
for (room_name, room) in self.rooms.iter() {
|
||||
out.write_fmt(format_args!("{}:", room_name))?;
|
||||
out.write_fmt(format_args!("{}", "-".repeat(32)))?;
|
||||
out.write_fmt(format_args!("{}:\n", room_name))?;
|
||||
out.write_fmt(format_args!("{}\n", "-".repeat(32)))?;
|
||||
room.print_status_into(out)?;
|
||||
out.write_fmt(format_args!("\n"))?;
|
||||
println!();
|
||||
Reference in New Issue
Block a user