Commit c3844619d78ac1ecffc883adfd3a81353e732d1d

Authored by Georg Hopp
1 parent accd8aba

hide currently unused code

Showing 1 changed file with 6 additions and 6 deletions
... ... @@ -75,21 +75,21 @@ impl<'a> From<&'a MarkdownJson> for MarkdownChange<'a> {
75 75 }
76 76 }
77 77
78   -pub(crate) enum Action {
  78 +pub(crate) enum _Action {
79 79 Created(Markdown),
80 80 Found(Markdown),
81 81 }
82 82
83 83
84   -pub(crate) fn create_markdown( pool: Arc<Pool>
85   - , item: MarkdownJson ) -> Result<Action, Error> {
  84 +pub(crate) fn _create_markdown( pool: Arc<Pool>
  85 + , item: MarkdownJson ) -> Result<_Action, Error> {
86 86 use crate::schema::markdowns::dsl::*;
87 87 let db_connection = pool.get()?;
88 88
89 89 match markdowns . filter(name.eq(&item.name))
90 90 . first::<Markdown>(&db_connection)
91 91 {
92   - Ok(result) => Ok(Action::Found(result)),
  92 + Ok(result) => Ok(_Action::Found(result)),
93 93 Err(_) => {
94 94 let now = chrono::Local::now().naive_local();
95 95 let new_markdown = MarkdownNew {
... ... @@ -100,7 +100,7 @@ pub(crate) fn create_markdown( pool: Arc<Pool>
100 100 date_updated: &format!("{}", now),
101 101 };
102 102
103   - Ok(Action::Created(db_connection.transaction(|| {
  103 + Ok(_Action::Created(db_connection.transaction(|| {
104 104 insert_into(markdowns) . values(&new_markdown)
105 105 . execute(&db_connection)?;
106 106
... ... @@ -150,7 +150,7 @@ pub(crate) fn get_markdown( pool: Arc<Pool>
150 150 Ok(markdown)
151 151 }
152 152
153   -pub(crate) fn delete_markdown( pool: Arc<Pool>
  153 +pub(crate) fn _delete_markdown( pool: Arc<Pool>
154 154 , ident: i32 ) -> Result<usize, Error>
155 155 {
156 156 use crate::schema::markdowns::dsl::*;
... ...
Please register or login to post a comment