Skip to content

Commit

Permalink
Ensure that Error: Send + Sync
Browse files Browse the repository at this point in the history
  • Loading branch information
andy128k committed Dec 20, 2024
1 parent 44eece9 commit b1037c2
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

## Unreleased

- Add a test to ensure that `Error` satisfies `Send` and `Sync`.

## 2.0.11 - 2024-11-22

- Fix `]]>` escaping in `CDATA` sections. [`#174`](https://github.com/rust-syndication/rss/pull/174)
Expand Down
11 changes: 11 additions & 0 deletions src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,3 +70,14 @@ impl From<Utf8Error> for Error {
Error::Utf8(err)
}
}

#[cfg(test)]
mod test {
use super::*;

#[test]
fn error_send_and_sync() {
fn assert_send_sync<T: Send + Sync>() {}
assert_send_sync::<Error>();
}
}

0 comments on commit b1037c2

Please sign in to comment.