flip1995
6307b80027
[No-auto] lib/domain/habit: Fix Clippy warnings
...
Signed-off-by: flip1995 <hello@philkrones.com>
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-08-28 18:18:41 +02:00
flip1995
76878beb66
[Auto] lib/domain/habit: Fix Clippy warnings
...
Signed-off-by: flip1995 <hello@philkrones.com>
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-08-28 18:18:40 +02:00
flip1995
60fe113659
Replace r#try! with the ? operator
...
Signed-off-by: flip1995 <hello@philkrones.com>
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-08-28 18:18:40 +02:00
f3c41915fd
Do not create comment in habit instance
...
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-06-30 11:34:50 +02:00
5dc6829354
Rename module: linker -> linkable
...
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-06-21 23:22:48 +02:00
ef17930c29
Rename interface
...
With this patch, the libimagentrylink library interface gets renamed.
The trait gets renamed to the more descriptive name "Linkable", the
functions get renamed to not contain any notion of "internal" anymore.
This patch also adapts the whole source tree for the new libimagentrylink
interface, also renaming variables to not contain "_internal_" anymore.
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-06-21 23:22:47 +02:00
901502b67e
Split "internal" module into several submodules
...
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-05-31 12:48:00 +02:00
e200e40070
Add more context in error messages
...
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-05-18 00:55:10 +02:00
1d89844613
Run 'cargo fix' for rust-2018
...
With this patch we move the codebase to Rust-2018.
The diff was generated by executing
cargo fix --all --all-features --edition
on the codebase.
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-05-18 00:20:59 +02:00
cb4d5367e4
Rewrite all usages of ModuleEntryPath
...
Because the code was so complex before, we had to create an object and
then cast that object into a `StoreId` rather than just creating a
`StoreId` object right away.
With this patch, we're using the code-generation approach to generate a
function that creates a `StoreId` object based on the name of the
current module. That's way easier and error handling was also improved
by the switch to the new implementation.
The patch also includes a rewrite of all usages of ModuleEntryPath and
changes them to `module_path::new_id()` calls.
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-04-13 22:39:39 +02:00
9185abcfa5
Update copyright years
...
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-01-03 18:41:36 +01:00
ede70581f3
libimaghabit: Move from error-chain to failure
...
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2018-10-30 18:46:28 +01:00
e643f36fa3
Refactor libimaghabit to fit new store iterator interface
2018-05-01 17:44:00 +02:00
aa32dd1ec2
Add debugging output if kairos fails to parse input
2018-03-23 10:05:58 +01:00
835c003491
Merge pull request #1360 from matthiasbeyer/libimaghabit/create-vs-retrieve
...
Fix: Use retrieve in retrieve variant
2018-03-23 10:03:52 +01:00
30233456df
Fix: Use retrieve in retrieve variant
2018-03-22 21:34:00 +01:00
b62d7eab85
Fix: libimaghabit::habit::HabitTemplate should link created instances to the template
2018-03-22 21:32:58 +01:00
c857f97287
Merge pull request #1357 from matthiasbeyer/libimaghabit/create-vs-retrieve
...
Libimaghabit/create vs retrieve
2018-03-22 21:20:26 +01:00
247b9499a7
Refactor for less verbose code
2018-03-22 14:00:10 +01:00
2232f0153f
Dedup code
2018-03-22 13:54:15 +01:00
964b168f18
Add "retrieve" variants for retrieving instances
...
and fix create implementation to use `Store::create()`, which did the
wrong thing.
2018-03-22 13:51:12 +01:00
45fdeb4e18
Add helper to check whether an instance exists for a date
2018-03-22 13:44:41 +01:00
2b26db70ed
Make HabitBuilder derive Debug
2018-02-18 20:03:50 +01:00
d5a9e4930d
Update dates in license header
...
And add missing header in one file
2018-02-07 02:48:53 +01:00
4d94791b1f
Move date <-> string conversion utility to libimagutil
2018-02-01 09:26:33 +01:00
f2b72f4738
libimaghabit: Replace read with typed read
2018-01-13 01:14:03 +01:00
1f133eac3b
Use libimagentryutil::isa::Is in libimaghabit
2018-01-08 23:31:10 +01:00
dbd9a2faaf
Replace matching with function chaining
2018-01-05 11:37:09 +01:00
57cf5003bd
Move common functionality to utility module
2018-01-05 11:37:09 +01:00
af819f0fca
Remove unneeded "mut"
2018-01-04 19:34:21 +01:00
840bc86c90
Merge pull request #1178 from matthiasbeyer/libimaghabit/fix-until
...
Fix: Until date is still optional
2017-12-22 14:39:41 +01:00
6246d25c9d
Fix: Until date is still optional
2017-12-22 13:20:11 +01:00
09c9eb6090
Merge pull request #1175 from matthiasbeyer/libimaghabit/remove-unused
...
libimaghabit: Remove unused things
2017-12-22 12:29:50 +01:00
9bf4b9604b
Remove unused variables
2017-12-22 11:03:42 +01:00
96b51280ab
Remove unused imports
2017-12-22 11:01:35 +01:00
cd8f0beae8
Add until-date support
2017-12-22 10:59:27 +01:00
ddf703eaa0
Add HabitTemplate::next_instance_date_after()
...
Rewrite HabitTemplate::next_instance_date() to use the new function
2017-12-19 19:13:12 +01:00
6f244a52ff
Add function to instantiate with a given date
...
Use that function in the `create_instance()` function which was renamed
to `create_instance_today()`.
2017-12-19 19:13:04 +01:00
13e9ee3ffa
Add Habit::next_instance_date()
2017-12-08 14:54:49 +01:00
999bdf8d0d
Add HabitTemplate::linked_instances() function
2017-12-08 14:54:49 +01:00
30e05d21f9
Add debugging output
2017-12-08 14:54:49 +01:00
90a4139ede
Make builder consuming
2017-12-08 14:54:49 +01:00
9af2f34b58
Outsource instance id creation to helper fn
2017-12-08 14:54:45 +01:00
a6a36455f5
Add recur spec with kairos support
2017-12-08 14:54:41 +01:00
533d97532b
Move date-string conversion utils to util module
2017-12-08 14:54:40 +01:00
a71c9281ec
Initial import
2017-12-08 14:54:40 +01:00