error[E0277]: the size for values of type `str` cannot be known at compilation time
--> app/src/rocket/content/admin/domain.rs:102:22
|
102 | content: Cow::Borrowed(VIEW_ADMIN_PANEL_DOMAIN_NO_PERM),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
|
= help: the trait `Sized` is not implemented for `str`, which is required by `Cow<'_, str>: FastWritable`
= help: the trait `FastWritable` is implemented for `Cow<'_, T>`
= note: required for `Cow<'_, str>` to implement `FastWritable`
note: required by a bound in `domain_base::DomainBase`
--> app/src/rocket/template/authenticated/domain_base.rs:7:30
|
7 | pub struct DomainBase<'a, T: FastWritable> {
| ^^^^^^^^^^^^ required by this bound in `DomainBase`
DomainBase:
use std::borrow::Cow;
use askama::{FastWritable, Template};
use crate::rocket::auth::session::Permission;
#[derive(Template)]
#[template(path = "authenticated/domain_base.html")]
pub struct DomainBase<'a, T: FastWritable> {
pub domain: &'a str,
pub permission: Option<Permission>,
pub content: T,
}
The typebound in
|
impl<T: FastWritable + alloc::borrow::ToOwned> FastWritable for alloc::borrow::Cow<'_, T> { |
should probably include
+ ?Sized?
Edit: also, I just did realize, that I don't need to wrap the content in a Cow.
Nevertheless I feel like this should be addressed.
DomainBase:The typebound in
askama/askama/src/lib.rs
Line 418 in 73ba176
+ ?Sized?Edit: also, I just did realize, that I don't need to wrap the content in a
Cow.Nevertheless I feel like this should be addressed.