From 343661391c21f535e7b832f3fef05e09a61a0a29 Mon Sep 17 00:00:00 2001 From: HampusM Date: Mon, 31 Jul 2023 20:52:37 +0200 Subject: refactor!: remove SomeThreadsafePtrError BREAKING CHANGE: SomeThreadsafePtrError has been removed and SomePtrError is now used by both the methods of SomePtr and of SomeThreadsafePtr --- src/errors/ptr.rs | 21 ++------------------- 1 file changed, 2 insertions(+), 19 deletions(-) (limited to 'src/errors') 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, - }, -} -- cgit v1.2.3-18-g5258