- Change add_rule parameter from Option<&String> to Option<&str> for better ergonomics
- Use iterator methods (flat_map, any) instead of manual loops and collections
- Collapse nested if conditions using let-else patterns
- Use format string interpolation instead of separate arguments
- Avoid unnecessary String allocations in label comparisons
- Update CLI code to use as_deref() for Option<String> to Option<&str> conversion
- Update all documentation examples and tests to match new API
- All functionality preserved; API is more idiomatic and efficient
- Replace Option::unwrap() with pattern matching in add_rule label check
- Handle home directory resolution failures with proper Error types
- Add directory creation in save() to ensure parent directories exist
- Replace chrono unwraps with ? operator for date calculations
- Use unwrap_or with sensible defaults for parsing edge cases
- Keep unwrap in test code where immediate failure is desired
- All existing functionality preserved; no API changes
- Add comprehensive test coverage for all Rules public methods
- Test both success and error paths with proper assertions
- Add PartialEq derive to EolAction to enable comparisons in tests
- Include edge cases like duplicate labels and nonexistent IDs
- Mark file system integration tests as ignore to avoid interference
- add `TryFrom<&str>` implementation for `MessageAge`
- allows creating `MessageAge` from string slices
- returns `Error` for invalid formats
- improve `MessageAge::new` to return a `Result`
- changes error type to `Error` enum
- add `Error::InvalidMessageAge` for specific message age errors
- mark `MessageAge::parse` and other methods as `must_use`
- use byte string literals for character matching in `parse`
- update error messages to include the invalid input value
- add `#[derive(Hash)]` to `MessageAge`
- define struct for retention policy with message age and label generation
- add methods to create, access, and modify retention policies
- implement default values, cloning, equality, and debug formatting
- introduces `MessageAge` enum to represent retention periods
- supports days, weeks, months, and years
- adds parsing and formatting for `MessageAge` instances
- includes label generation for categorization
- introduce `Retention` struct for managing message retention policies
- add `new` constructor with age and generate_label options
- implement getter methods for age and generate_label
- add `set_generate_label` to control label generation dynamically
- provide examples and usage documentation
- include comprehensive unit tests
📝 docs(retention): document retention policy configuration
- provide detailed documentation for `Retention` struct
- include usage examples for creating and configuring retention policies
- explain the purpose of the `age` and `generate_label` fields
- describe the behavior of `set_generate_label` method
- update code examples for better clarity and correctness
- include example of setting up client with OAuth credentials
- add example of client configuration with file paths
- fix minor formatting issues and broken links
- Renamed `docs/readme/lib.md` to `docs/lib/lib.md` for better file structure.
- Updated code blocks to remove `path=null start=null` for cleaner rendering.