(self)
| 170 | |
| 171 | impl Into<server::Configuration> for Configuration { |
| 172 | fn into(self) -> server::Configuration { |
| 173 | match self.config { |
| 174 | None => server::Configuration::default(), |
| 175 | Some(ref path) => { |
| 176 | let mut config_file = |
| 177 | File::open(path).expect("failed to open server configuration file"); |
| 178 | |
| 179 | let mut contents = String::new(); |
| 180 | config_file |
| 181 | .read_to_string(&mut contents) |
| 182 | .expect("failed to read configuration file"); |
| 183 | |
| 184 | serde_json::from_str(&contents).expect("failed to parse configuration") |
| 185 | } |
| 186 | } |
| 187 | } |
| 188 | } |
| 189 | |
| 190 | impl Into<timely::Configuration> for Configuration { |
no outgoing calls
no test coverage detected