Skip to content

Expiration improvements#147

Closed
cgzones wants to merge 1 commit intomatze:masterfrom
cgzones:expire
Closed

Expiration improvements#147
cgzones wants to merge 1 commit intomatze:masterfrom
cgzones:expire

Conversation

@cgzones
Copy link
Copy Markdown
Contributor

@cgzones cgzones commented Apr 1, 2025

  • Support magnitude suffixes
  • Separate multiple human readable sections with comma
  • Reject expiration sets with duplicate duration values
  • Change month from 28 to 30 days
  • Change year from 336 to 365 days

Copy link
Copy Markdown
Owner

@matze matze left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two things:

  1. this should be documented in the README.md and the CHANGELOG.md.
  2. is this compatible with 3.0.0 behaviour?

Comment thread crates/wastebin_server/src/expiration.rs Outdated
@matze
Copy link
Copy Markdown
Owner

matze commented May 23, 2025

Could you rebase on top of master? I also already added an improved Display impl, so that part can be removed again.

* Support magnitude suffixes
* Separate multiple human readable sections with comma
* Reject expiration sets with duplicate duration values
* Change month from 28 to 30 days
* Change year from 336 to 365 days
write!(f, "{years} years")?;
} else {
parts.push(String::from("1 year"));
write!(f, "1 year")?;
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please drop these changes. The join in the original code already inserts separators.

@matze
Copy link
Copy Markdown
Owner

matze commented Jun 4, 2025

I split the changes into individual commits and also added relevant CHANGELOG.md and README.md documentation. Hope that's fine. You are still attributed as commit author.

@matze matze closed this Jun 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants