diff options
author | HampusM <hampus@hampusmat.com> | 2023-07-31 20:52:37 +0200 |
---|---|---|
committer | HampusM <hampus@hampusmat.com> | 2023-07-31 20:52:37 +0200 |
commit | 343661391c21f535e7b832f3fef05e09a61a0a29 (patch) | |
tree | e6b06b2fa2addab0a1aa5ae209e5b8b9cf91cfe4 /src/errors | |
parent | 118651055b7844e04aa5b89023c385e483de305f (diff) |
refactor!: remove SomeThreadsafePtrError
BREAKING CHANGE: SomeThreadsafePtrError has been removed and SomePtrError is now used by both the methods of SomePtr and of SomeThreadsafePtr
Diffstat (limited to 'src/errors')
-rw-r--r-- | src/errors/ptr.rs | 21 |
1 files changed, 2 insertions, 19 deletions
diff --git a/src/errors/ptr.rs b/src/errors/ptr.rs index 56621c1..1db10c7 100644 --- a/src/errors/ptr.rs +++ b/src/errors/ptr.rs @@ -1,8 +1,9 @@ //! Smart pointer alias errors. -/// Error type for [`SomePtr`]. +/// Error type for [`SomePtr`] and [`SomeThreadsafePtr`]. /// /// [`SomePtr`]: crate::ptr::SomePtr +/// [`SomeThreadsafePtr`]: crate::ptr::SomeThreadsafePtr #[derive(thiserror::Error, Debug)] pub enum SomePtrError { @@ -17,21 +18,3 @@ pub enum SomePtrError found: &'static str, }, } - -/// Error type for [`SomeThreadsafePtr`]. -/// -/// [`SomeThreadsafePtr`]: crate::ptr::SomeThreadsafePtr -#[derive(thiserror::Error, Debug)] -pub enum SomeThreadsafePtrError -{ - /// Tried to get as a wrong threadsafe smart pointer type. - #[error("Wrong threadsafe smart pointer type. Expected {expected}, found {found}")] - WrongPtrType - { - /// The expected smart pointer type. - expected: &'static str, - - /// The found smart pointer type. - found: &'static str, - }, -} |