wrapper.rs
This file
Path
src/wrapper.rs
84 lines · 1.9 KiB · Rust
Last changed by
Merge pull request #414 from dtolnay/nightlyDavid Tolnaybefore adoption213a9c2
History of this fileTake it
The walk stopped after 200 commits: lines older than 553ed38 point at it.
Update clippy.toml msrv to match rust-version in Cargo.tomlDavid Tolnaybefore adoption553ed38
lines 1–3why, one step back1use crate::StdError;2use core::fmt::{self, Debug, Display};3Merge pull request #383 from dtolnay/nostdDavid Tolnaybefore adoption8ecfcdf
line 4why, one step back4#[cfg(any(feature = "std", not(anyhow_no_core_error)))]Work around prelude redundant import warningsDavid Tolnaybefore adoptiondfc7bc0
lines 5–6why, one step back5use alloc::boxed::Box;6Merge pull request #331 from dtolnay/backtraceDavid Tolnaybefore adoptioncf66194
line 7why, one step back7#[cfg(error_generic_member_access)]Merge pull request #414 from dtolnay/nightlyDavid Tolnaybefore adoption213a9c2
line 8why, one step back8use crate::nightly::{self, Request};Update clippy.toml msrv to match rust-version in Cargo.tomlDavid Tolnaybefore adoption553ed38
lines 9–55why, one step back910#[repr(transparent)]11pub struct MessageError<M>(pub M);1213impl<M> Debug for MessageError<M>14where15 M: Display + Debug,16{17 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {18 Debug::fmt(&self.0, f)19 }20}2122impl<M> Display for MessageError<M>23where24 M: Display + Debug,25{26 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {27 Display::fmt(&self.0, f)28 }29}3031impl<M> StdError for MessageError<M> where M: Display + Debug + 'static {}3233#[repr(transparent)]34pub struct DisplayError<M>(pub M);3536impl<M> Debug for DisplayError<M>37where38 M: Display,39{40 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {41 Display::fmt(&self.0, f)42 }43}4445impl<M> Display for DisplayError<M>46where47 M: Display,48{49 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {50 Display::fmt(&self.0, f)51 }52}5354impl<M> StdError for DisplayError<M> where M: Display + 'static {}55Merge pull request #383 from dtolnay/nostdDavid Tolnaybefore adoption8ecfcdf
line 56why, one step back56#[cfg(any(feature = "std", not(anyhow_no_core_error)))]Update clippy.toml msrv to match rust-version in Cargo.tomlDavid Tolnaybefore adoption553ed38
lines 57–59why, one step back57#[repr(transparent)]58pub struct BoxedError(pub Box<dyn StdError + Send + Sync>);59Merge pull request #383 from dtolnay/nostdDavid Tolnaybefore adoption8ecfcdf
line 60why, one step back60#[cfg(any(feature = "std", not(anyhow_no_core_error)))]Update clippy.toml msrv to match rust-version in Cargo.tomlDavid Tolnaybefore adoption553ed38
lines 61–66why, one step back61impl Debug for BoxedError {62 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {63 Debug::fmt(&self.0, f)64 }65}66Merge pull request #383 from dtolnay/nostdDavid Tolnaybefore adoption8ecfcdf
line 67why, one step back67#[cfg(any(feature = "std", not(anyhow_no_core_error)))]Update clippy.toml msrv to match rust-version in Cargo.tomlDavid Tolnaybefore adoption553ed38
lines 68–73why, one step back68impl Display for BoxedError {69 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {70 Display::fmt(&self.0, f)71 }72}73Merge pull request #383 from dtolnay/nostdDavid Tolnaybefore adoption8ecfcdf
line 74why, one step back74#[cfg(any(feature = "std", not(anyhow_no_core_error)))]Update clippy.toml msrv to match rust-version in Cargo.tomlDavid Tolnaybefore adoption553ed38
lines 75–79why, one step back75impl StdError for BoxedError {76 fn source(&self) -> Option<&(dyn StdError + 'static)> {77 self.0.source()78 }79Merge pull request #331 from dtolnay/backtraceDavid Tolnaybefore adoptioncf66194
line 80why, one step back80 #[cfg(error_generic_member_access)]Merge pull request #319 from dtolnay/errorprovideDavid Tolnaybefore adoption8cf1d15
line 81why, one step back81 fn provide<'a>(&'a self, request: &mut Request<'a>) {Merge pull request #414 from dtolnay/nightlyDavid Tolnaybefore adoption213a9c2
line 82why, one step back82 nightly::provide(&*self.0, request);Update clippy.toml msrv to match rust-version in Cargo.tomlDavid Tolnaybefore adoption553ed38
lines 83–84why, one step back83 }84}