|
1 | 1 | // Licensed under the Apache License, Version 2.0 |
2 | 2 |
|
3 | 3 | use anyhow::{anyhow, bail, Context, Result}; |
4 | | -use cargo_manifest::{Manifest, Product, Value}; |
| 4 | +use cargo_manifest::{Manifest, Product, StringOrBool, Value}; |
5 | 5 |
|
6 | 6 | use std::ffi::OsString; |
7 | 7 | use std::fs::{DirBuilder, File}; |
@@ -186,8 +186,8 @@ pub fn install_package( |
186 | 186 | // The entry for the build script can be empty (in which case build.rs is implicitly used if it |
187 | 187 | // exists), or a path, or false (in which case build.rs is not implicitly used). |
188 | 188 | let build = match &package.build { |
189 | | - Some(Value::Boolean(false)) => None, |
190 | | - Some(Value::String(path)) => Some(path.as_str()), |
| 189 | + Some(StringOrBool::Bool(false)) => None, |
| 190 | + Some(StringOrBool::String(path)) => Some(path.as_str()), |
191 | 191 | Some(_) => bail!("Value of 'build' is not a string or boolean"), |
192 | 192 | None => None, |
193 | 193 | }; |
@@ -306,9 +306,7 @@ pub fn install_files_from_metadata( |
306 | 306 | for rel_path in install_entries { |
307 | 307 | let src = package_path.as_ref().join(&rel_path); |
308 | 308 | copy(&src, &dest).with_context(|| { |
309 | | - format!( |
310 | | - "Could not process [package.metadata.ros.{key}] entry '{rel_path}'", |
311 | | - ) |
| 309 | + format!("Could not process [package.metadata.ros.{key}] entry '{rel_path}'",) |
312 | 310 | })?; |
313 | 311 | } |
314 | 312 | } |
|
0 commit comments