Skip to content

Adding RSS feeds for multi-chapter stories

Ghost User requested to merge (removed):main into main

As-is, the current MR will not work due to template issues (build log below).

Apart from the last two errors, which are just me not having found how to display pre-sanitized variables yet, I tried multiple syntaxes but I don't know how to properly format the template to

  • call the author_path method with the authors list
  • properly match the Optional<NaiveDateTime> entries, because it should be supported but I can't make sense of the error.
Build failure log

   Compiling intertextual v1.4.0 (/home/diane/dev/git/contrib/intertextual)
error[E0615]: attempted to take value of method `author_path` on type `Story`
  --> src/endpoints/rss_feed.rs:22:10
   |
22 | #[derive(Template)]
   |          ^^^^^^^^ method, not a field
   |
   = note: this error originates in the derive macro `Template` (in Nightly builds, run with -Z macro-backtrace for more info)
help: use parentheses to call the method
   |
22 | #[derive(Template(_))]
   |                  ^^^
error[E0277]: std::option::Option<std::string::String> doesn't implement std::fmt::Display
--> src/endpoints/rss_feed.rs:22:10
|
22 | #[derive(Template)]
|          ^^^^^^^^ std::option::Option<std::string::String> cannot be formatted with the default formatter
|
= help: the trait std::fmt::Display is not implemented for std::option::Option<std::string::String>
= note: in format strings you may be able to use {:?} (or {:#?} for pretty-print) instead
= note: required because of the requirements on the impl of std::fmt::Display for &std::option::Option<std::string::String>
note: required by MarkupDisplay::<E, T>::new_unsafe
--> /home/diane/.cargo/registry/src/github.com-1ecc6299db9ec823/askama_escape-0.10.1/src/lib.rs:18:5
|
18 |     pub fn new_unsafe(value: T, escaper: E) -> Self {
|     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= note: this error originates in the derive macro Template (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0277]: std::option::Option<std::string::String> doesn't implement std::fmt::Display
--> src/endpoints/rss_feed.rs:22:10
|
22 | #[derive(Template)]
|          ^^^^^^^^ std::option::Option<std::string::String> cannot be formatted with the default formatter
|
= help: the trait std::fmt::Display is not implemented for std::option::Option<std::string::String>
= note: in format strings you may be able to use {:?} (or {:#?} for pretty-print) instead
= note: this error originates in the macro $crate::format_args (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0277]: intertextual::prelude::SanitizedHtml doesn't implement std::fmt::Display
--> src/endpoints/rss_feed.rs:22:10
|
22 | #[derive(Template)]
|          ^^^^^^^^ intertextual::prelude::SanitizedHtml cannot be formatted with the default formatter
|
= help: the trait std::fmt::Display is not implemented for intertextual::prelude::SanitizedHtml
= note: in format strings you may be able to use {:?} (or {:#?} for pretty-print) instead
= note: required because of the requirements on the impl of std::fmt::Display for &intertextual::prelude::SanitizedHtml
note: required by MarkupDisplay::<E, T>::new_unsafe
--> /home/diane/.cargo/registry/src/github.com-1ecc6299db9ec823/askama_escape-0.10.1/src/lib.rs:18:5
|
18 |     pub fn new_unsafe(value: T, escaper: E) -> Self {
|     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= note: this error originates in the derive macro Template (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0277]: intertextual::prelude::SanitizedHtml doesn't implement std::fmt::Display
--> src/endpoints/rss_feed.rs:22:10
|
22 | #[derive(Template)]
|          ^^^^^^^^ intertextual::prelude::SanitizedHtml cannot be formatted with the default formatter
|
= help: the trait std::fmt::Display is not implemented for intertextual::prelude::SanitizedHtml
= note: in format strings you may be able to use {:?} (or {:#?} for pretty-print) instead
= note: this error originates in the macro $crate::format_args (in Nightly builds, run with -Z macro-backtrace for more info)
Some errors have detailed explanations: E0277, E0615.
For more information about an error, try rustc --explain E0277.
error: could not compile intertextual due to 7 previous errors
Edited by Ghost User

Merge request reports