File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ homepage = "https://github.com/init4tech/bin-base"
1313repository = " https://github.com/init4tech/bin-base"
1414
1515[dependencies ]
16- init4-from-env-derive = { path = " ./from-env-derive " }
16+ init4-from-env-derive = " 0.1.0 "
1717
1818# Tracing
1919tracing = " 0.1.40"
Original file line number Diff line number Diff line change @@ -304,14 +304,17 @@ pub trait FromEnv: core::fmt::Debug + Sized + 'static {
304304/// impl.
305305///
306306/// ```
307- /// # use init4_bin_base::utils::from_env::FromEnvVar;
307+ /// # use init4_bin_base::utils::from_env::{FromEnvVar, FromEnvErr};
308+ /// # use std::str::FromStr;
309+ /// # #[derive(Debug)]
308310/// # pub struct MyCoolType;
309311/// # impl std::str::FromStr for MyCoolType {
310- /// # type Err;
312+ /// # type Err = std::convert::Infallible ;
311313/// # fn from_str(s: &str) -> Result<Self, Self::Err> {
312314/// # Ok(MyCoolType)
313315/// # }
314316/// # }
317+ ///
315318/// // We can re-use the `FromStr` implementation for our `FromEnvVar` impl.
316319/// impl FromEnvVar for MyCoolType {
317320/// type Error = <MyCoolType as FromStr>::Err;
You can’t perform that action at this time.
0 commit comments