diff options
author | Matthias Beyer <mail@beyermatthias.de> | 2016-01-31 12:39:47 +0100 |
---|---|---|
committer | Matthias Beyer <mail@beyermatthias.de> | 2016-02-09 13:45:13 +0100 |
commit | 5fdbb61ac850d41c5c6cb4618ecec26dadbffc77 (patch) | |
tree | 7f488061d773e839515c13ea504d2fd089748c95 /imag-store | |
parent | 2c30d474a9f3c746c9784fc48ddb241f931f5b37 (diff) |
create() fixup: entry_from_raw() -> string_from_raw_src()
Diffstat (limited to 'imag-store')
-rw-r--r-- | imag-store/src/create.rs | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/imag-store/src/create.rs b/imag-store/src/create.rs index bb3eaad0..576ea10f 100644 --- a/imag-store/src/create.rs +++ b/imag-store/src/create.rs @@ -48,14 +48,14 @@ fn create_from_cli_spec(rt: &Runtime, matches: &ArgMatches, path: &PathBuf) -> R .unwrap_or_else(|| { entry_subcommand .value_of("content-from") - .map(|src| entry_from_raw(src)) + .map(|src| string_from_raw_src(src)) .unwrap_or(String::new()) }) }) .unwrap_or_else(|| { debug!("Didn't find entry subcommand, getting raw content"); matches.value_of("from-raw") - .map(|raw_src| entry_from_raw(raw_src)) + .map(|raw_src| string_from_raw_src(raw_src)) .unwrap_or(String::new()) }); @@ -85,7 +85,7 @@ fn create_from_source(rt: &Runtime, matches: &ArgMatches, path: &PathBuf) -> Res let content = matches .value_of("from-raw") .ok_or(StoreError::new(StoreErrorKind::NoCommandlineCall, None)) - .map(|raw_src| entry_from_raw(raw_src)); + .map(|raw_src| string_from_raw_src(raw_src)); if content.is_err() { return content.map(|_| ()); @@ -106,7 +106,7 @@ fn create_from_source(rt: &Runtime, matches: &ArgMatches, path: &PathBuf) -> Res .map_err(|serr| StoreError::new(StoreErrorKind::BackendError, Some(Box::new(serr)))) } -fn entry_from_raw(raw_src: &str) -> String { +fn string_from_raw_src(raw_src: &str) -> String { let mut content = String::new(); if raw_src == "-" { debug!("Reading entry from stdin"); @@ -123,4 +123,3 @@ fn entry_from_raw(raw_src: &str) -> String { } content } - |