Skip to content

Commit

Permalink
"object safe" is now "dyn-compatible"
Browse files Browse the repository at this point in the history
The phrase was changed in
<rust-lang/rust#130852>.
  • Loading branch information
Kijewski committed Oct 12, 2024
1 parent 0ec827f commit 9e78d13
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions rinja/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -174,9 +174,11 @@ impl<T: Template + ?Sized> Template for &T {
const MIME_TYPE: &'static str = T::MIME_TYPE;
}

/// Object-safe wrapper trait around [`Template`] implementers
/// [`dyn`-compatible] wrapper trait around [`Template`] implementers
///
/// This trades reduced performance (mostly due to writing into `dyn Write`) for object safety.
/// This trades reduced performance (mostly due to writing into `dyn Write`) for dyn-compatibility.
///
/// [`dyn`-compatible]: <https://doc.rust-lang.org/stable/reference/items/traits.html#object-safety>
pub trait DynTemplate {
/// Helper method which allocates a new `String` and renders into it
fn dyn_render(&self) -> Result<String>;
Expand Down

0 comments on commit 9e78d13

Please sign in to comment.