fmt, clippy
This commit is contained in:
@@ -114,7 +114,7 @@ impl BuildType {
|
||||
|
||||
/// The architecture suffix used in artifact file names:
|
||||
/// host arch, `all` or `source`.
|
||||
pub fn arch_suffix<'a>(self, host_arch: &'a str) -> &'a str {
|
||||
pub fn arch_suffix(self, host_arch: &str) -> &str {
|
||||
if self.has_any(ARCH_DEP) {
|
||||
host_arch
|
||||
} else if self.has_any(ARCH_INDEP) {
|
||||
@@ -133,7 +133,10 @@ mod tests {
|
||||
fn parse_options() {
|
||||
assert_eq!(BuildType::from_options("full").unwrap(), FULL);
|
||||
assert_eq!(BuildType::from_options("source").unwrap(), SOURCE);
|
||||
assert_eq!(BuildType::from_options("source,any").unwrap(), SOURCE_ARCH_DEP);
|
||||
assert_eq!(
|
||||
BuildType::from_options("source,any").unwrap(),
|
||||
SOURCE_ARCH_DEP
|
||||
);
|
||||
assert_eq!(BuildType::from_options("any,all").unwrap(), BINARY);
|
||||
assert!(BuildType::from_options("bogus").is_err());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user