summaryrefslogtreecommitdiffstats
path: root/src/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/main.rs b/src/main.rs
index 80eec21..8f123dc 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -132,12 +132,7 @@ fn hash_map_targets<'a>(c : &'a Config, targets : Vec<Target>)
/// splits the target and return the capture name part
fn cname_from_target<'a>(t : &'a String) -> Result<String> {
- Ok(
- t.split('.')
- .nth(1)
- .ok_or(Error::from("no capture name found"))?
- .into()
- )
+ t.split('.').nth(1).map(str::to_string).ok_or(Error::from("no capture name found").into())
}
/// Iterate the hashmap created with the above function