Skip to content

Commit 1691d17

Browse files
committed
Remove mentions of salvo
I previously removed the `salvo` support from `askama_web` in [7bc35a9], because -- IMHO -- “the project is in too bad a state”. My assessment about the project did not improve, to be honest. Related advisory: [GHSA-54m3-5fxr-2f3j]. [GHSA-54m3-5fxr-2f3j]: <https://redirect.github.com/salvo-rs/salvo/security/advisories/GHSA-54m3-5fxr-2f3j> [7bc35a9]: <https://redirect.github.com/askama-rs/askama_web/commit/7bc35a932141dc1fa4f5207638fa9ae83d09e31f>
1 parent 2627a4e commit 1691d17

File tree

17 files changed

+3
-594
lines changed

17 files changed

+3
-594
lines changed

.github/workflows/rust.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
- run: |
3131
set -eu
3232
for PKG in \
33-
bench-build examples/actix-web-app examples/axum-app examples/poem-app examples/rocket-app examples/salvo-app examples/warp-app fuzzing \
33+
bench-build examples/actix-web-app examples/axum-app examples/poem-app examples/rocket-app examples/warp-app fuzzing \
3434
askama askama_derive askama_escape askama_macros askama_parser \
3535
testing testing-alloc testing-no-std testing-renamed
3636
do
@@ -129,7 +129,7 @@ jobs:
129129
cargo sort --check --check-format --grouped
130130
set -eu
131131
for PKG in \
132-
bench-build examples/actix-web-app examples/axum-app examples/poem-app examples/rocket-app examples/salvo-app examples/warp-app fuzzing \
132+
bench-build examples/actix-web-app examples/axum-app examples/poem-app examples/rocket-app examples/warp-app fuzzing \
133133
askama askama_derive askama_escape askama_macros askama_parser \
134134
testing testing-alloc testing-no-std testing-renamed
135135
do
@@ -171,7 +171,7 @@ jobs:
171171
strategy:
172172
matrix:
173173
package: [
174-
bench-build, examples/actix-web-app, examples/axum-app, examples/poem-app, examples/rocket-app, examples/salvo-app, examples/warp-app, fuzzing,
174+
bench-build, examples/actix-web-app, examples/axum-app, examples/poem-app, examples/rocket-app, examples/warp-app, fuzzing,
175175
askama, askama_derive, askama_escape, askama_macros, askama_parser,
176176
testing, testing-alloc, testing-no-std, testing-renamed,
177177
]

book/src/frameworks.md

Lines changed: 0 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -289,66 +289,6 @@ impl<'r> Responder<'r, 'static> for AppError {
289289
}
290290
```
291291

292-
## Salvo
293-
294-
[![our salvo example web-app](
295-
https://img.shields.io/badge/salvo-example-informational?style=flat-square&logo=git&logoColor=white&color=%23228b22
296-
)](
297-
https://github.com/askama-rs/askama/tree/master/examples/salvo-app "our salvo example web-app"
298-
)
299-
[![crates.io: salvo](
300-
https://img.shields.io/crates/v/salvo?label=salvo&style=flat-square&logo=rust&logoColor=white&color=informational
301-
)](
302-
https://crates.io/crates/salvo "crates.io: salvo"
303-
)
304-
305-
To convert the `String` to an HTML response, you can use
306-
[`Text::Html(_)`](https://docs.rs/salvo/0.76.0/salvo/prelude/enum.Text.html#variant.Html).
307-
308-
```rust
309-
use salvo::writing::Text;
310-
use salvo::{Scribe, handler};
311-
312-
#[handler]
313-
async fn handler() -> Result<impl Scribe, AppError> {
314-
315-
Ok(Text::Html(template.render()?))
316-
}
317-
```
318-
319-
To implement your own error type, you can use this boilerplate code:
320-
321-
```rust
322-
use askama::Template;
323-
use salvo::http::StatusCode;
324-
use salvo::writing::Text;
325-
use salvo::{Response, Scribe};
326-
327-
#[derive(Debug, displaydoc::Display, thiserror::Error)]
328-
enum AppError {
329-
/// could not render template
330-
Render(#[from] askama::Error),
331-
}
332-
333-
impl Scribe for AppError {
334-
fn render(self, res: &mut Response) {
335-
#[derive(Debug, Template)]
336-
#[template(path = "error.html")]
337-
struct Tmpl { … }
338-
339-
res.status_code(match &self {
340-
AppError::Render(_) => StatusCode::INTERNAL_SERVER_ERROR,
341-
});
342-
let tmpl = Tmpl { … };
343-
if let Ok(body) = tmpl.render() {
344-
Text::Html(body).render(res);
345-
} else {
346-
Text::Plain("Something went wrong").render(res);
347-
}
348-
}
349-
}
350-
```
351-
352292
## Warp
353293

354294
[![our warp example web-app](

examples/salvo-app/.rustfmt.toml

Lines changed: 0 additions & 1 deletion
This file was deleted.

examples/salvo-app/Cargo.toml

Lines changed: 0 additions & 31 deletions
This file was deleted.

examples/salvo-app/LICENSE-APACHE

Lines changed: 0 additions & 1 deletion
This file was deleted.

examples/salvo-app/LICENSE-MIT

Lines changed: 0 additions & 1 deletion
This file was deleted.

examples/salvo-app/README.md

Lines changed: 0 additions & 17 deletions
This file was deleted.

examples/salvo-app/_typos.toml

Lines changed: 0 additions & 1 deletion
This file was deleted.

examples/salvo-app/clippy.toml

Lines changed: 0 additions & 1 deletion
This file was deleted.

examples/salvo-app/deny.toml

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)