From 71bf772482f904af90d5320dcfea5795d8f03103 Mon Sep 17 00:00:00 2001 From: Alexander Korolev Date: Sat, 11 Jan 2025 23:48:04 +0100 Subject: [PATCH] fixed tests --- README.md | 2 +- release.sh | 3 +++ src/configurable.rs | 6 +++++- templates/README.md | 2 +- 4 files changed, 10 insertions(+), 3 deletions(-) create mode 100755 release.sh diff --git a/README.md b/README.md index 88e30f7..39ef0fb 100644 --- a/README.md +++ b/README.md @@ -76,7 +76,7 @@ warp = { version = "0.3", default-features = false } in src/main.rs: -```rust, no_run +```rust, compile_fail use std::{convert::Infallible, env, net::SocketAddr, sync::Arc}; use cookie::time::Duration; diff --git a/release.sh b/release.sh new file mode 100755 index 0000000..599cbe0 --- /dev/null +++ b/release.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +echo "release" \ No newline at end of file diff --git a/src/configurable.rs b/src/configurable.rs index 6b6d41f..2184f72 100644 --- a/src/configurable.rs +++ b/src/configurable.rs @@ -9,7 +9,11 @@ pub trait Configurable { /// /// # Examples /// - /// ``` + /// ```rust, no_run + ///# use openid::{Configurable, Config}; + ///# #[derive(Default)] + ///# struct MyType; + ///# impl Configurable for MyType { fn config(&self) -> &Config { todo!() }} /// let config = MyType::default().config(); /// ``` fn config(&self) -> &Config; diff --git a/templates/README.md b/templates/README.md index 9bfa023..4a34e7e 100644 --- a/templates/README.md +++ b/templates/README.md @@ -62,6 +62,6 @@ in Cargo.toml: in src/main.rs: -{{ codeblock "rust, no_run" ( http_get (replace "https://raw.githubusercontent.com/kilork/openid-examples/vVERSION/examples/warp.rs" "VERSION" (env_var "OPENID_RUST_MAJOR_VERSION") ) ) }} +{{ codeblock "rust, compile_fail" ( http_get (replace "https://raw.githubusercontent.com/kilork/openid-examples/vVERSION/examples/warp.rs" "VERSION" (env_var "OPENID_RUST_MAJOR_VERSION") ) ) }} See full example: [openid-examples: warp](https://github.com/kilork/openid-examples/blob/v{{ env_var "OPENID_RUST_MAJOR_VERSION" }}/examples/warp.rs)