From 51e3dd528919599c3d2beff56c59a4cb7fe24371 Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Fri, 9 Nov 2018 17:40:25 +0100 Subject: Extract code in `lib.rs` to `errors.rs` and `purchaser.rs` Split up the code to get things a bit more organised. I want a function to create a connection to the MySQL database and I don't want to lump it in with the rest. --- license-generator/src/errors.rs | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 license-generator/src/errors.rs (limited to 'license-generator/src/errors.rs') diff --git a/license-generator/src/errors.rs b/license-generator/src/errors.rs new file mode 100644 index 0000000..7eb9eda --- /dev/null +++ b/license-generator/src/errors.rs @@ -0,0 +1,7 @@ +use mysql; + +error_chain! { + foreign_links { + MySql(mysql::error::Error); + } +} -- cgit v1.2.3