We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ec1167b commit 47a59b1Copy full SHA for 47a59b1
freertos-cargo-build/src/lib.rs
@@ -237,10 +237,7 @@ impl Builder {
237
pub fn compile(&self) -> Result<(), Error> {
238
let mut b = self.cc.clone();
239
240
- let path_error = self.verify_paths();
241
- if path_error.is_err() {
242
- return path_error;
243
- }
+ self.verify_paths()?;
244
245
// FreeRTOS header files
246
b.include(self.freertos_include_dir());
@@ -258,10 +255,7 @@ impl Builder {
258
255
b.file(f);
259
256
});
260
257
261
- let res = b.try_compile("freertos");
262
- if res.is_err() {
263
- return Err(Error::new(&format!("{}", res.unwrap_err())));
264
+ b.try_compile("freertos").map_err(|e| Error::new(&format!("{}", e)))?;
265
266
Ok(())
267
}
0 commit comments