Remove smush rules, fix warnings

This commit is contained in:
Piv
2023-03-09 18:58:54 +10:30
parent 540e4c778d
commit 887e7c950b
6 changed files with 23 additions and 84 deletions

View File

@@ -5,9 +5,6 @@ use std::ffi::CString;
pub use self::move_money::*;
mod smush_rules;
pub use self::smush_rules::*;
mod overhead_allocation;
pub use self::overhead_allocation::*;
@@ -50,7 +47,8 @@ pub extern "C" fn move_money_from_text(
&mut output_writer,
use_numeric_accounts,
true,
);
)
.expect("Failed to move money");
// TODO: Replace all these unwraps with something more elegant
let inner = output_writer.into_inner().unwrap();
CString::new(String::from_utf8(inner).unwrap())
@@ -119,7 +117,8 @@ pub extern "C" fn allocate_overheads_from_text(
false,
true,
account_type.to_str().unwrap().to_owned(),
);
)
.expect("Failed to allocate overheads");
let inner = output_writer.into_inner().unwrap();
CString::new(String::from_utf8(inner).unwrap())
.unwrap()