|
@@ -23,7 +23,6 @@ fn build_snippet_from_matches(matches: &ArgMatches) -> io::Result<OutgoingSnippe
|
23
|
23
|
title: title.to_string(),
|
24
|
24
|
body,
|
25
|
25
|
filetype: filetype.to_string(),
|
26
|
|
- formatted_body: String::from(""),
|
27
|
26
|
})
|
28
|
27
|
}
|
29
|
28
|
|
|
@@ -45,10 +44,7 @@ pub fn new_snippet(matches: &ArgMatches) -> io::Result<()> {
|
45
|
44
|
|
46
|
45
|
match create_snippet(snippet, &config) {
|
47
|
46
|
Ok(resp) => match resp {
|
48
|
|
- ApiResult::IncomingSnippet { id, .. } => println!(
|
49
|
|
- "Success! Your new snippet is available at {}/snippets/{}",
|
50
|
|
- url, id
|
51
|
|
- ),
|
|
47
|
+ ApiResult::IncomingSnippet { id, .. } => println!("{}/snippets/{}", url, id),
|
52
|
48
|
ApiResult::IncomingError { message } => println!("error: {}", message),
|
53
|
49
|
},
|
54
|
50
|
Err(err) => println!("{}", err),
|