mirror of
https://github.com/askama-rs/askama.git
synced 2025-10-03 07:45:14 +00:00
Add missing #[inline]
for <_ as Deref>::deref()
This commit is contained in:
parent
9c67e2a7d9
commit
53f4eb0b81
@ -229,6 +229,7 @@ pub(crate) struct SyntaxAndCache<'a> {
|
|||||||
impl<'a> Deref for SyntaxAndCache<'a> {
|
impl<'a> Deref for SyntaxAndCache<'a> {
|
||||||
type Target = Syntax<'a>;
|
type Target = Syntax<'a>;
|
||||||
|
|
||||||
|
#[inline]
|
||||||
fn deref(&self) -> &Self::Target {
|
fn deref(&self) -> &Self::Target {
|
||||||
&self.syntax
|
&self.syntax
|
||||||
}
|
}
|
||||||
@ -240,6 +241,7 @@ struct OwnedSyntaxAndCacheKey(SyntaxAndCacheKey<'static>);
|
|||||||
impl Deref for OwnedSyntaxAndCacheKey {
|
impl Deref for OwnedSyntaxAndCacheKey {
|
||||||
type Target = SyntaxAndCacheKey<'static>;
|
type Target = SyntaxAndCacheKey<'static>;
|
||||||
|
|
||||||
|
#[inline]
|
||||||
fn deref(&self) -> &Self::Target {
|
fn deref(&self) -> &Self::Target {
|
||||||
&self.0
|
&self.0
|
||||||
}
|
}
|
||||||
|
@ -634,8 +634,9 @@ impl<'a> WritableBuffer<'a> {
|
|||||||
impl<'a> Deref for WritableBuffer<'a> {
|
impl<'a> Deref for WritableBuffer<'a> {
|
||||||
type Target = [Writable<'a>];
|
type Target = [Writable<'a>];
|
||||||
|
|
||||||
|
#[inline]
|
||||||
fn deref(&self) -> &Self::Target {
|
fn deref(&self) -> &Self::Target {
|
||||||
&self.buf[..]
|
self.buf.as_slice()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -222,6 +222,7 @@ impl<'a, T> WithSpan<'a, T> {
|
|||||||
impl<T> Deref for WithSpan<'_, T> {
|
impl<T> Deref for WithSpan<'_, T> {
|
||||||
type Target = T;
|
type Target = T;
|
||||||
|
|
||||||
|
#[inline]
|
||||||
fn deref(&self) -> &Self::Target {
|
fn deref(&self) -> &Self::Target {
|
||||||
&self.inner
|
&self.inner
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user