Skip to content

Conversation

zecakeh
Copy link
Collaborator

@zecakeh zecakeh commented Dec 21, 2024

AttachmentConfig::with_thumbnail() is replaced by AttachmentConfig::new().thumbnail().

Simplifies the use of AttachmentConfig, by avoiding code like:

let config = if let Some(thumbnail) = thumbnail {
  AttachmentConfig::with_thumbnail(thumbnail)
} else {
  AttachmentConfig::new()
};

…od instead of constructor

`Attachment::with_thumbnail()` is replaced by `AttachmentConfig::new().thumbnail()`.

Simplifies the use of `AttachmentConfig`, by avoiding code like:

```rust
let config = if let Some(thumbnail) = thumbnail {
  AttachmentConfig::with_thumbnail(thumbnail)
} else {
  AttachmentConfig::new()
};
```

Signed-off-by: Kévin Commaille <[email protected]>
@zecakeh zecakeh requested a review from a team as a code owner December 21, 2024 17:26
@zecakeh zecakeh requested review from poljar and removed request for a team December 21, 2024 17:26
Copy link

codecov bot commented Dec 21, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 85.05%. Comparing base (adb4428) to head (b42b961).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4452      +/-   ##
==========================================
- Coverage   85.06%   85.05%   -0.01%     
==========================================
  Files         283      283              
  Lines       31748    31749       +1     
==========================================
- Hits        27005    27003       -2     
- Misses       4743     4746       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@poljar poljar left a comment

Choose a reason for hiding this comment

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

Neat, could you add a changelog entry?

@zecakeh
Copy link
Collaborator Author

zecakeh commented Dec 22, 2024

Oh the project is not using git-cliff anymore? Sure, I'll do that.

Signed-off-by: Kévin Commaille <[email protected]>
@poljar
Copy link
Contributor

poljar commented Dec 22, 2024

Oh the project is not using git-cliff anymore? Sure, I'll do that.

Yeah, after a brief adventure we're back to manual changelogs.

Copy link
Contributor

@poljar poljar left a comment

Choose a reason for hiding this comment

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

Looks good, thanks.

@poljar poljar enabled auto-merge (squash) December 22, 2024 17:30
@poljar poljar merged commit c503583 into matrix-org:main Dec 22, 2024
40 checks passed
@zecakeh zecakeh deleted the attachment-config-thumbnail branch December 22, 2024 17:45
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