mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-25 08:13:41 +00:00
17 lines
308 B
Rust
17 lines
308 B
Rust
use std::{fs, io::*};
|
|
use std::collections::HashMap;
|
|
|
|
type Handle = BufWriter<fs::File>;
|
|
struct Thing(HashMap<String, Handle>);
|
|
|
|
impl Thing {
|
|
pub fn die_horribly(&mut self) {
|
|
for v in self.0.values() {
|
|
v.flush();
|
|
//~^ ERROR cannot borrow
|
|
}
|
|
}
|
|
}
|
|
|
|
fn main() {}
|